Don't fetch file size in thread list
This commit is contained in:
parent
2d36794a17
commit
c5034a64d5
2 changed files with 11 additions and 5 deletions
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue