mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-29 01:48:53 +03:00
Got it working - Just need to test it out
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
parent
9a3702d0ce
commit
b41f41f704
2 changed files with 24 additions and 21 deletions
|
@ -1294,28 +1294,31 @@ class ChatActivity :
|
|||
}
|
||||
|
||||
runOnUiThread {
|
||||
binding.typingIndicator.text = typingString
|
||||
binding.typingIndicator.text = typingString.append("\nTESTING LINE 2\nTESTING LINE 3\nTESTING LINE 4")
|
||||
|
||||
if (participantNames.size > 0) {
|
||||
binding.typingIndicatorWrapper.visibility = View.VISIBLE
|
||||
binding.typingIndicatorWrapper.animate()
|
||||
.translationY(binding.fragmentContainerActivityChat.y - DisplayUtils.convertDpToPixel(18f, context))
|
||||
.translationYBy(DisplayUtils.convertDpToPixel(-18f, context))
|
||||
.setInterpolator(AccelerateDecelerateInterpolator())
|
||||
.duration = TYPING_INDICATOR_ANIMATION_DURATION
|
||||
} else {
|
||||
if (binding.typingIndicator.lineCount == 1) {
|
||||
binding.typingIndicatorWrapper.animate()
|
||||
.translationY(binding.fragmentContainerActivityChat.y)
|
||||
.setInterpolator(AccelerateDecelerateInterpolator())
|
||||
.duration = TYPING_INDICATOR_ANIMATION_DURATION
|
||||
} else if (binding.typingIndicator.lineCount == 2) {
|
||||
binding.typingIndicatorWrapper.animate()
|
||||
.translationY(
|
||||
binding.fragmentContainerActivityChat.y +
|
||||
DisplayUtils.convertDpToPixel(15f, context)
|
||||
)
|
||||
.setInterpolator(AccelerateDecelerateInterpolator())
|
||||
.duration = TYPING_INDICATOR_ANIMATION_DURATION
|
||||
}
|
||||
binding.typingIndicatorWrapper.visibility = View.GONE
|
||||
binding.typingIndicatorWrapper.y += DisplayUtils.convertDpToPixel(18f, context)
|
||||
// if (binding.typingIndicator.lineCount == 1) { // FIXME ???? Seems like some weird formatting code
|
||||
// binding.typingIndicatorWrapper.animate()
|
||||
// .translationY(binding.fragmentContainerActivityChat.y)
|
||||
// .setInterpolator(AccelerateDecelerateInterpolator())
|
||||
// .duration = TYPING_INDICATOR_ANIMATION_DURATION
|
||||
// } else if (binding.typingIndicator.lineCount == 2) {
|
||||
// binding.typingIndicatorWrapper.animate()
|
||||
// .translationY(
|
||||
// binding.fragmentContainerActivityChat.y +
|
||||
// DisplayUtils.convertDpToPixel(15f, context)
|
||||
// )
|
||||
// .setInterpolator(AccelerateDecelerateInterpolator())
|
||||
// .duration = TYPING_INDICATOR_ANIMATION_DURATION
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3384,10 +3387,10 @@ class ChatActivity :
|
|||
val messageTemp = message as ChatMessage
|
||||
messageTemp.lastEditTimestamp = message.lastEditTimestamp
|
||||
|
||||
val index = adapter?.getMessagePositionById(messageTemp.id) ?: 0
|
||||
val adapterMsg = adapter?.items?.get(index)?.item as ChatMessage
|
||||
// val index = adapter?.getMessagePositionById(messageTemp.id) ?: 0
|
||||
// val adapterMsg = adapter?.items?.get(index)?.item as ChatMessage
|
||||
|
||||
messageTemp.parentMessage = adapterMsg.parentMessage
|
||||
// messageTemp.parentMessage = adapterMsg.parentMessage
|
||||
messageTemp.isOneToOneConversation =
|
||||
currentConversation?.type == ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL
|
||||
messageTemp.activeUser = conversationUser
|
||||
|
|
|
@ -226,8 +226,8 @@
|
|||
android:id="@+id/typing_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/side_margin"
|
||||
android:layout_marginEnd="@dimen/side_margin"
|
||||
android:paddingStart="@dimen/side_margin"
|
||||
android:paddingEnd="@dimen/side_margin"
|
||||
android:background="@color/bg_default"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
|
|
Loading…
Reference in a new issue