mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fixing a crash at fetching Date Taken values from our db
This commit is contained in:
@@ -455,10 +455,14 @@ class MediaFetcher(val context: Context) {
|
||||
}
|
||||
}
|
||||
|
||||
val dateTakenValues = if (folder == FAVORITES) {
|
||||
context.dateTakensDB.getAllDateTakens()
|
||||
} else {
|
||||
context.dateTakensDB.getDateTakensFromPath(folder)
|
||||
val dateTakenValues = try {
|
||||
if (folder == FAVORITES) {
|
||||
context.dateTakensDB.getAllDateTakens()
|
||||
} else {
|
||||
context.dateTakensDB.getDateTakensFromPath(folder)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
return dateTakens
|
||||
}
|
||||
|
||||
dateTakenValues.forEach {
|
||||
|
Reference in New Issue
Block a user