do not trigger the database deleteMedia file, if there is nothing to delete
This commit is contained in:
parent
b4b861c453
commit
e31be23bf4
|
@ -573,7 +573,9 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
|||
}
|
||||
}
|
||||
|
||||
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
|
||||
if (mediaToDelete.isNotEmpty()) {
|
||||
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue