mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-29 19:27:59 +01:00
fetch the file name only when needed
This commit is contained in:
parent
af3b4e46f0
commit
ac462f5a3c
1 changed files with 1 additions and 1 deletions
|
@ -302,9 +302,9 @@ class MediaFetcher(val context: Context) {
|
||||||
if (cursor.moveToFirst()) {
|
if (cursor.moveToFirst()) {
|
||||||
do {
|
do {
|
||||||
try {
|
try {
|
||||||
val path = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
|
|
||||||
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
||||||
if (dateTaken != 0L) {
|
if (dateTaken != 0L) {
|
||||||
|
val path = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
|
||||||
dateTakens[path] = dateTaken
|
dateTakens[path] = dateTaken
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
Loading…
Reference in a new issue