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

View file

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