fixing a crash at fetching Date Taken values from our db

This commit is contained in:
tibbi 2020-12-05 23:27:49 +01:00
parent 49c809815f
commit 15285e8c2c

View file

@ -455,11 +455,15 @@ class MediaFetcher(val context: Context) {
}
}
val dateTakenValues = if (folder == FAVORITES) {
val dateTakenValues = try {
if (folder == FAVORITES) {
context.dateTakensDB.getAllDateTakens()
} else {
context.dateTakensDB.getDateTakensFromPath(folder)
}
} catch (e: Exception) {
return dateTakens
}
dateTakenValues.forEach {
dateTakens[it.fullPath] = it.taken