mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
Don't fetch file size in thread list
This commit is contained in:
@@ -25,11 +25,15 @@ fun View.setupDocumentPreview(
|
||||
filename.text = title
|
||||
}
|
||||
|
||||
try {
|
||||
val size = context.getFileSizeFromUri(uri)
|
||||
file_size.beVisible()
|
||||
file_size.text = size.formatSize()
|
||||
} catch (e: Exception) {
|
||||
if (attachment) {
|
||||
try {
|
||||
val size = context.getFileSizeFromUri(uri)
|
||||
file_size.beVisible()
|
||||
file_size.text = size.formatSize()
|
||||
} catch (e: Exception) {
|
||||
file_size.beGone()
|
||||
}
|
||||
} else {
|
||||
file_size.beGone()
|
||||
}
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/medium_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -48,6 +49,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
android:visibility="gone"
|
||||
tools:text="2.18 KB" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
Reference in New Issue
Block a user