fix: 修复聊天界面自己发送图片格式消息时头像错位问题

This commit is contained in:
糕小菜 2024-12-12 16:21:23 +08:00
parent c5b0cde2bd
commit 3c899768d7
2 changed files with 2 additions and 1 deletions

View File

@ -186,6 +186,7 @@ class ChatAdapter(
if (sender) ConstantsUtil.getAvatarUrl() else message.avatarUrl if (sender) ConstantsUtil.getAvatarUrl() else message.avatarUrl
Glide.with(binding.root.context).load(avatarUrl) Glide.with(binding.root.context).load(avatarUrl)
.into(if (sender) binding.ifvAvatarMine else binding.ifvAvatar) .into(if (sender) binding.ifvAvatarMine else binding.ifvAvatar)
setViewVisibility( setViewVisibility(
parentView = binding.root, parentView = binding.root,
sender = sender, sender = sender,

View File

@ -41,7 +41,7 @@
android:layout_width="35dp" android:layout_width="35dp"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginVertical="20dp" android:layout_marginVertical="20dp"
android:layout_marginStart="10dp" android:layout_marginEnd="10dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:src="@drawable/ic_avatar" android:src="@drawable/ic_avatar"
app:layout_constraintTop_toBottomOf="@id/tv_timer" app:layout_constraintTop_toBottomOf="@id/tv_timer"