mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-02-06 14:46:43 +01:00
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,11 +455,15 @@ class MediaFetcher(val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val dateTakenValues = if (folder == FAVORITES) {
|
val dateTakenValues = try {
|
||||||
|
if (folder == FAVORITES) {
|
||||||
context.dateTakensDB.getAllDateTakens()
|
context.dateTakensDB.getAllDateTakens()
|
||||||
} else {
|
} else {
|
||||||
context.dateTakensDB.getDateTakensFromPath(folder)
|
context.dateTakensDB.getDateTakensFromPath(folder)
|
||||||
}
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
return dateTakens
|
||||||
|
}
|
||||||
|
|
||||||
dateTakenValues.forEach {
|
dateTakenValues.forEach {
|
||||||
dateTakens[it.fullPath] = it.taken
|
dateTakens[it.fullPath] = it.taken
|
||||||
|
|
Loading…
Reference in a new issue