mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 20:10:04 +03:00
Add fallback logic only if the mode is thumbnail.
This commit is contained in:
parent
34c5537436
commit
7158554ee2
1 changed files with 7 additions and 10 deletions
|
@ -128,16 +128,13 @@ class ImageContentRenderer @Inject constructor(private val activeSessionHolder:
|
|||
.with(imageView)
|
||||
.load(resolvedUrl)
|
||||
.apply {
|
||||
contentUrlResolver
|
||||
.resolveFullSize(data.url)
|
||||
?.takeIf { it != resolvedUrl }
|
||||
?.let { fullSizeUrl ->
|
||||
error(
|
||||
GlideApp
|
||||
.with(imageView)
|
||||
.load(fullSizeUrl)
|
||||
)
|
||||
}
|
||||
if (mode == Mode.THUMBNAIL) {
|
||||
error(
|
||||
GlideApp
|
||||
.with(imageView)
|
||||
.load(contentUrlResolver.resolveFullSize(data.url))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue