Skip to content

Commit

Permalink
Rescan path after deleting .nomedia
Browse files Browse the repository at this point in the history
  • Loading branch information
naveensingh committed Mar 12, 2023
1 parent 05adf8a commit f49348d
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
}

Expand Down

0 comments on commit f49348d

Please sign in to comment.