do not trigger the database deleteMedia file, if there is nothing to delete

This commit is contained in:
tibbi 2019-02-16 16:00:18 +01:00
parent b4b861c453
commit e31be23bf4
1 changed files with 3 additions and 1 deletions

View File

@ -573,7 +573,9 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
}
}
if (mediaToDelete.isNotEmpty()) {
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
}
}.start()
}