Merge pull request #2800 from Naveen3Singh/fix_no_media_deletion

Fix deleting hidden files
This commit is contained in:
Tibor Kaputa 2023-03-15 12:42:00 +01:00 committed by GitHub
commit 2da6302775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -253,8 +253,15 @@ fun BaseSimpleActivity.removeNoMedia(path: String, callback: (() -> Unit)? = nul
tryDeleteFileDirItem(file.toFileDirItem(applicationContext), false, false) { tryDeleteFileDirItem(file.toFileDirItem(applicationContext), false, false) {
callback?.invoke() callback?.invoke()
deleteFromMediaStore(file.absolutePath) deleteFromMediaStore(file.absolutePath) { needsRescan ->
rescanFolderMedia(path) if (needsRescan) {
rescanAndDeletePath(path) {
rescanFolderMedia(path)
}
} else {
rescanFolderMedia(path)
}
}
} }
} }