Loading commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt +5 −0 Original line number Diff line number Diff line Loading @@ -334,6 +334,11 @@ fun Context.rescanDeletedPath(path: String, callback: (() -> Unit)? = null) { if (deleteFromMediaStore(path)) { callback?.invoke() } else { if (getDoesFilePathExist(path) || getIsPathDirectory(path)) { callback?.invoke() return } MediaScannerConnection.scanFile(applicationContext, arrayOf(path), null, { s, uri -> try { applicationContext.contentResolver.delete(uri, null, null) Loading Loading
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt +5 −0 Original line number Diff line number Diff line Loading @@ -334,6 +334,11 @@ fun Context.rescanDeletedPath(path: String, callback: (() -> Unit)? = null) { if (deleteFromMediaStore(path)) { callback?.invoke() } else { if (getDoesFilePathExist(path) || getIsPathDirectory(path)) { callback?.invoke() return } MediaScannerConnection.scanFile(applicationContext, arrayOf(path), null, { s, uri -> try { applicationContext.contentResolver.delete(uri, null, null) Loading