Add some spacing between attachments and text

This commit is contained in:
Naveen 2023-02-19 15:17:51 +05:30
parent 0b33ec877d
commit 49597a8db3
3 changed files with 7 additions and 3 deletions

View File

@ -260,8 +260,9 @@ class ThreadAdapter(
holder.viewClicked(message)
}
thread_mesage_attachments_holder.removeAllViews()
if (message.attachment?.attachments?.isNotEmpty() == true) {
thread_mesage_attachments_holder.beVisible()
thread_mesage_attachments_holder.removeAllViews()
for (attachment in message.attachment.attachments) {
val mimetype = attachment.mimetype
when {
@ -272,6 +273,8 @@ class ThreadAdapter(
thread_message_play_outline.beVisibleIf(mimetype.startsWith("video/"))
}
} else {
thread_mesage_attachments_holder.beGone()
}
}
}

View File

@ -5,5 +5,4 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:paddingBottom="@dimen/medium_margin"
app:shapeAppearanceOverlay="@style/roundedImageView" />

View File

@ -5,7 +5,7 @@
android:id="@+id/thread_message_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:layout_marginTop="@dimen/small_margin"
android:foreground="@drawable/selector"
android:paddingStart="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin">
@ -23,6 +23,7 @@
android:id="@+id/thread_mesage_attachments_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="@dimen/tiny_margin"
android:divider="@drawable/linear_layout_vertical_divider"
android:orientation="vertical"
android:showDividers="middle" />
@ -44,6 +45,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/thread_mesage_attachments_holder"
android:layout_alignParentEnd="true"
android:layout_marginVertical="@dimen/tiny_margin"
android:autoLink="email|web"
android:background="@drawable/item_sent_background"
android:padding="@dimen/normal_margin"