Merge pull request #1262 from KryptKode/fix/delete_from_mediastore_on_rename

fix renamed  leaves a empty file in media store
This commit is contained in:
Tibor Kaputa 2022-01-18 15:29:41 +01:00 committed by GitHub
commit 9cb42cbf35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -841,6 +841,7 @@ fun BaseSimpleActivity.renameFile(
runOnUiThread {
callback?.invoke(true, false)
}
deleteFromMediaStore(oldPath)
scanPathRecursively(newPath)
}
} else {
@ -849,6 +850,7 @@ fun BaseSimpleActivity.renameFile(
}
updateInMediaStore(oldPath, newPath)
scanPathsRecursively(arrayListOf(newPath)) {
deleteFromMediaStore(oldPath)
runOnUiThread {
callback?.invoke(true, false)
}