mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-14 13:08:56 +01:00
Ensure media store scan is triggered after saving an image (fixes #6808)
This commit is contained in:
@@ -24,7 +24,7 @@ class ImageSaver(
|
||||
) {
|
||||
|
||||
@SuppressLint("InlinedApi")
|
||||
suspend fun save(image: Image): Uri {
|
||||
fun save(image: Image): Uri {
|
||||
val data = image.data
|
||||
|
||||
val type = ImageUtil.findImageType(data) ?: throw Exception("Not an image")
|
||||
@@ -63,6 +63,8 @@ class ImageSaver(
|
||||
}
|
||||
}
|
||||
|
||||
DiskUtil.scanMedia(context, picture)
|
||||
|
||||
return picture
|
||||
}
|
||||
|
||||
@@ -77,6 +79,8 @@ class ImageSaver(
|
||||
}
|
||||
}
|
||||
|
||||
DiskUtil.scanMedia(context, destFile)
|
||||
|
||||
return destFile.getUriCompat(context)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user