mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
Merge pull request #2800 from Naveen3Singh/fix_no_media_deletion
Fix deleting hidden files
This commit is contained in:
commit
2da6302775
1 changed files with 9 additions and 2 deletions
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue