mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Bug fix of issue 2780
Signed-off-by: Julius Linus julius.linus@nextcloud.com
This commit is contained in:
parent
4014e76d8a
commit
8158eebb4f
@ -34,6 +34,7 @@ import com.nextcloud.talk.databinding.ItemCustomIncomingPreviewMessageBinding;
|
|||||||
import com.nextcloud.talk.databinding.ReactionsInsideMessageBinding;
|
import com.nextcloud.talk.databinding.ReactionsInsideMessageBinding;
|
||||||
import com.nextcloud.talk.models.json.chat.ChatMessage;
|
import com.nextcloud.talk.models.json.chat.ChatMessage;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.emoji2.widget.EmojiTextView;
|
import androidx.emoji2.widget.EmojiTextView;
|
||||||
|
|
||||||
@ -46,15 +47,17 @@ public class IncomingPreviewMessageViewHolder extends PreviewMessageViewHolder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBind(ChatMessage message) {
|
public void onBind(@NonNull ChatMessage message) {
|
||||||
super.onBind(message);
|
super.onBind(message);
|
||||||
|
|
||||||
|
binding.messageAuthor.setText(message.getActorDisplayName());
|
||||||
binding.messageText.setTextColor(ContextCompat.getColor(binding.messageText.getContext(),
|
binding.messageText.setTextColor(ContextCompat.getColor(binding.messageText.getContext(),
|
||||||
R.color.no_emphasis_text));
|
R.color.no_emphasis_text));
|
||||||
binding.messageTime.setTextColor(ContextCompat.getColor(binding.messageText.getContext(),
|
binding.messageTime.setTextColor(ContextCompat.getColor(binding.messageText.getContext(),
|
||||||
R.color.no_emphasis_text));
|
R.color.no_emphasis_text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public EmojiTextView getMessageText() {
|
public EmojiTextView getMessageText() {
|
||||||
return binding.messageText;
|
return binding.messageText;
|
||||||
@ -65,21 +68,25 @@ public class IncomingPreviewMessageViewHolder extends PreviewMessageViewHolder {
|
|||||||
return binding.progressBar;
|
return binding.progressBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public View getPreviewContainer() {
|
public View getPreviewContainer() {
|
||||||
return binding.previewContainer;
|
return binding.previewContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public MaterialCardView getPreviewContactContainer() {
|
public MaterialCardView getPreviewContactContainer() {
|
||||||
return binding.contactContainer;
|
return binding.contactContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public ImageView getPreviewContactPhoto() {
|
public ImageView getPreviewContactPhoto() {
|
||||||
return binding.contactPhoto;
|
return binding.contactPhoto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public EmojiTextView getPreviewContactName() {
|
public EmojiTextView getPreviewContactName() {
|
||||||
return binding.contactName;
|
return binding.contactName;
|
||||||
|
@ -52,6 +52,19 @@
|
|||||||
app:flexWrap="wrap"
|
app:flexWrap="wrap"
|
||||||
app:justifyContent="flex_end">
|
app:justifyContent="flex_end">
|
||||||
|
|
||||||
|
<androidx.emoji2.widget.EmojiTextView
|
||||||
|
android:id="@+id/messageAuthor"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:alpha="0.6"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="@color/no_emphasis_text"
|
||||||
|
android:textIsSelectable="false"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:ignore="TextContrastCheck"
|
||||||
|
tools:text="Jane Doe" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/preview_container"
|
android:id="@+id/preview_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -160,6 +173,7 @@
|
|||||||
app:layout_alignSelf="flex_start"
|
app:layout_alignSelf="flex_start"
|
||||||
app:layout_flexGrow="1"
|
app:layout_flexGrow="1"
|
||||||
app:layout_wrapBefore="true"
|
app:layout_wrapBefore="true"
|
||||||
|
tools:ignore="TextContrastCheck"
|
||||||
tools:text="A simple message" />
|
tools:text="A simple message" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -173,6 +187,7 @@
|
|||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:textColor="@color/no_emphasis_text"
|
android:textColor="@color/no_emphasis_text"
|
||||||
app:layout_alignSelf="center"
|
app:layout_alignSelf="center"
|
||||||
|
tools:ignore="TextContrastCheck"
|
||||||
tools:text="12:38" />
|
tools:text="12:38" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
Loading…
Reference in New Issue
Block a user