Merge pull request #2844 from nextcloud/feature/noid/scrollingInChatEnhancements

Scroll to quoted message also for outgoing messages
This commit is contained in:
Andy Scherzinger 2023-03-07 16:19:58 +01:00 committed by GitHub
commit 6ad498818d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,7 @@ import com.google.android.flexbox.FlexboxLayout
import com.nextcloud.talk.R
import com.nextcloud.talk.application.NextcloudTalkApplication
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
import com.nextcloud.talk.controllers.ChatController
import com.nextcloud.talk.databinding.ItemCustomOutcomingTextMessageBinding
import com.nextcloud.talk.models.json.chat.ChatMessage
import com.nextcloud.talk.models.json.chat.ReadStatus
@ -169,6 +170,11 @@ class OutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessageViewH
binding.messageQuote.quotedMessageAuthor.setTextColor(textColor)
binding.messageQuote.quotedMessage.setTextColor(textColor)
binding.messageQuote.quoteColoredView.setBackgroundColor(textColor)
binding.messageQuote.quotedChatMessageView.setOnClickListener() {
val chatController = commonMessageInterface as ChatController
chatController.jumpToQuotedMessage(parentChatMessage)
}
}
private fun setBubbleOnChatMessage(message: ChatMessage) {