mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
make the Date Taken from Fix Date Taken value be higher priority than mediastore
This commit is contained in:
parent
2517170aeb
commit
650a985a9c
1 changed files with 6 additions and 2 deletions
|
@ -407,8 +407,8 @@ class MediaFetcher(val context: Context) {
|
|||
try {
|
||||
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
||||
if (dateTaken != 0L) {
|
||||
val path = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
|
||||
dateTakens[path] = dateTaken
|
||||
val name = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
|
||||
dateTakens[name] = dateTaken
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
|
@ -416,6 +416,10 @@ class MediaFetcher(val context: Context) {
|
|||
}
|
||||
}
|
||||
|
||||
context.dateTakensDB.getDateTakensFromPath(folder).forEach {
|
||||
dateTakens[it.filename] = it.taken
|
||||
}
|
||||
|
||||
return dateTakens
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue