use the context at media scanning
This commit is contained in:
parent
f73e109a25
commit
ba262425eb
1 changed files with 1 additions and 1 deletions
|
@ -182,7 +182,7 @@ fun Context.scanPaths(paths: ArrayList<String>, action: () -> Unit) {
|
|||
|
||||
fun Context.rescanPaths(paths: ArrayList<String>, action: () -> Unit) {
|
||||
var cnt = paths.size
|
||||
MediaScannerConnection.scanFile(this, paths.toTypedArray(), null, { s, uri ->
|
||||
MediaScannerConnection.scanFile(applicationContext, paths.toTypedArray(), null, { s, uri ->
|
||||
if (--cnt == 0)
|
||||
action.invoke()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue