set avatar invisible when message is null
This commit is contained in:
parent
4d5445d123
commit
03cf48f4c1
|
@ -93,7 +93,6 @@ public class MessageAdapter
|
|||
if (holder instanceof MessageReceivedViewHolder messageReceivedViewHolder) {
|
||||
final var addressWithName = message.getAddressWithName();
|
||||
final var avatar = message.getAvatar();
|
||||
messageReceivedViewHolder.binding.avatar.setVisibility(View.VISIBLE);
|
||||
if (avatar != null) {
|
||||
AvatarFetcher.fetchInto(messageReceivedViewHolder.binding.avatar, avatar);
|
||||
} else {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
android:paddingVertical="6dp">
|
||||
|
||||
<ImageView
|
||||
android:visibility="@{message == null ? View.INVISIBLE : View.VISIBLE}"
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="@dimen/avatar_chat_overview_size"
|
||||
android:layout_height="@dimen/avatar_chat_overview_size"
|
||||
|
|
Loading…
Reference in a new issue