fixing a crash at fetching Date Taken values from our db
This commit is contained in:
parent
49c809815f
commit
15285e8c2c
1 changed files with 8 additions and 4 deletions
|
@ -455,10 +455,14 @@ class MediaFetcher(val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val dateTakenValues = if (folder == FAVORITES) {
|
val dateTakenValues = try {
|
||||||
context.dateTakensDB.getAllDateTakens()
|
if (folder == FAVORITES) {
|
||||||
} else {
|
context.dateTakensDB.getAllDateTakens()
|
||||||
context.dateTakensDB.getDateTakensFromPath(folder)
|
} else {
|
||||||
|
context.dateTakensDB.getDateTakensFromPath(folder)
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
return dateTakens
|
||||||
}
|
}
|
||||||
|
|
||||||
dateTakenValues.forEach {
|
dateTakenValues.forEach {
|
||||||
|
|
Loading…
Reference in a new issue