From 8158eebb4f209d26eb7a1ebdda31b6911d7c829a Mon Sep 17 00:00:00 2001 From: rapterjet2004 Date: Fri, 23 Jun 2023 14:31:08 -0500 Subject: [PATCH] Bug fix of issue 2780 Signed-off-by: Julius Linus julius.linus@nextcloud.com --- .../IncomingPreviewMessageViewHolder.java | 9 ++++++++- .../item_custom_incoming_preview_message.xml | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingPreviewMessageViewHolder.java b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingPreviewMessageViewHolder.java index 2b896d74d..507944ce6 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingPreviewMessageViewHolder.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingPreviewMessageViewHolder.java @@ -34,6 +34,7 @@ import com.nextcloud.talk.databinding.ItemCustomIncomingPreviewMessageBinding; import com.nextcloud.talk.databinding.ReactionsInsideMessageBinding; import com.nextcloud.talk.models.json.chat.ChatMessage; +import androidx.annotation.NonNull; import androidx.core.content.ContextCompat; import androidx.emoji2.widget.EmojiTextView; @@ -46,15 +47,17 @@ public class IncomingPreviewMessageViewHolder extends PreviewMessageViewHolder { } @Override - public void onBind(ChatMessage message) { + public void onBind(@NonNull ChatMessage message) { super.onBind(message); + binding.messageAuthor.setText(message.getActorDisplayName()); binding.messageText.setTextColor(ContextCompat.getColor(binding.messageText.getContext(), R.color.no_emphasis_text)); binding.messageTime.setTextColor(ContextCompat.getColor(binding.messageText.getContext(), R.color.no_emphasis_text)); } + @NonNull @Override public EmojiTextView getMessageText() { return binding.messageText; @@ -65,21 +68,25 @@ public class IncomingPreviewMessageViewHolder extends PreviewMessageViewHolder { return binding.progressBar; } + @NonNull @Override public View getPreviewContainer() { return binding.previewContainer; } + @NonNull @Override public MaterialCardView getPreviewContactContainer() { return binding.contactContainer; } + @NonNull @Override public ImageView getPreviewContactPhoto() { return binding.contactPhoto; } + @NonNull @Override public EmojiTextView getPreviewContactName() { return binding.contactName; diff --git a/app/src/main/res/layout/item_custom_incoming_preview_message.xml b/app/src/main/res/layout/item_custom_incoming_preview_message.xml index 798ebcd9a..da6061cd0 100644 --- a/app/src/main/res/layout/item_custom_incoming_preview_message.xml +++ b/app/src/main/res/layout/item_custom_incoming_preview_message.xml @@ -52,6 +52,19 @@ app:flexWrap="wrap" app:justifyContent="flex_end"> + +