Flush previous image before loading the next in ImageViewer

This commit is contained in:
Matéo Duparc 2021-12-25 16:13:34 +01:00
parent bee2997f90
commit 23d017780f
Signed by: hardcoresushi
GPG Key ID: 007F84120107191E
2 changed files with 4 additions and 2 deletions

View File

@ -14,8 +14,8 @@ android {
applicationId "sushi.hardcore.droidfs"
minSdkVersion 21
targetSdkVersion 29
versionCode 20
versionName "1.7.0"
versionCode 21
versionName "1.7.1"
ndk {
abiFilters "x86", "x86_64", "armeabi-v7a", "arm64-v8a"

View File

@ -170,6 +170,8 @@ class ImageViewer: FileViewerActivity() {
}
private fun loadImage(){
bitmap = null
requestBuilder = null
loadWholeFile(filePath)?.let {
val displayWithGlide = if (it.size < 5_000_000) {
true