diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index a0fdf3c51..d2a9bfa48 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -217,7 +217,10 @@ fun BaseSimpleActivity.toggleFileVisibility(oldPath: String, hide: Boolean, call val newPath = "$path/$filename" renameFile(oldPath, newPath) { - callback?.invoke(newPath) + runOnUiThread { + callback?.invoke(newPath) + } + ensureBackgroundThread { updateDBMediaPath(oldPath, newPath) }