mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-09 16:48:44 +01:00
Merge pull request #2800 from Naveen3Singh/fix_no_media_deletion
Fix deleting hidden files
This commit is contained in:
commit
2da6302775
@ -253,8 +253,15 @@ fun BaseSimpleActivity.removeNoMedia(path: String, callback: (() -> Unit)? = nul
|
||||
|
||||
tryDeleteFileDirItem(file.toFileDirItem(applicationContext), false, false) {
|
||||
callback?.invoke()
|
||||
deleteFromMediaStore(file.absolutePath)
|
||||
rescanFolderMedia(path)
|
||||
deleteFromMediaStore(file.absolutePath) { needsRescan ->
|
||||
if (needsRescan) {
|
||||
rescanAndDeletePath(path) {
|
||||
rescanFolderMedia(path)
|
||||
}
|
||||
} else {
|
||||
rescanFolderMedia(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user