diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt index 1aedc5873..ab890613f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt @@ -49,7 +49,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va val name = file.name val path = file.absolutePath - val dateModified = if (fileSorting and SORT_BY_DATE_MODIFIED != 0) file.lastModified() else 0 + val dateModified = if (fileSorting and SORT_BY_DATE_MODIFIED != 0) file.lastModified() else file.lastModified() media.add(Medium(name, path, isVideo, dateModified, dateModified, size)) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt index 4bc5042da..26d2df20a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt @@ -68,7 +68,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo val name = file.name val absolutePath = file.absolutePath - val dateModified = if (fileSorting and SORT_BY_DATE_MODIFIED != 0) file.lastModified() else 0 + val dateModified = if (fileSorting and SORT_BY_DATE_MODIFIED != 0) file.lastModified() else file.lastModified() media.add(Medium(name, absolutePath, isVideo, dateModified, dateModified, size)) } return media