diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt index 70dd894e0..487b23293 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt @@ -467,7 +467,7 @@ class MediaFetcher(val context: Context) { if (cursor.moveToFirst()) { do { try { - val lastModified = cursor.getLongValue(Images.Media.DATE_MODIFIED) + val lastModified = cursor.getLongValue(Images.Media.DATE_MODIFIED) * 1000 if (lastModified != 0L) { val name = cursor.getStringValue(Images.Media.DISPLAY_NAME) lastModifieds["$folder/$name"] = lastModified diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Medium.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Medium.kt index 4bdc2e33c..d1c03170f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Medium.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Medium.kt @@ -19,17 +19,17 @@ import java.util.* @Entity(tableName = "media", indices = [(Index(value = ["full_path"], unique = true))]) data class Medium( - @PrimaryKey(autoGenerate = true) var id: Long?, - @ColumnInfo(name = "filename") var name: String, - @ColumnInfo(name = "full_path") var path: String, - @ColumnInfo(name = "parent_path") var parentPath: String, - @ColumnInfo(name = "last_modified") val modified: Long, - @ColumnInfo(name = "date_taken") var taken: Long, - @ColumnInfo(name = "size") val size: Long, - @ColumnInfo(name = "type") val type: Int, - @ColumnInfo(name = "video_duration") val videoDuration: Int, - @ColumnInfo(name = "is_favorite") var isFavorite: Boolean, - @ColumnInfo(name = "deleted_ts") var deletedTS: Long) : Serializable, ThumbnailItem() { + @PrimaryKey(autoGenerate = true) var id: Long?, + @ColumnInfo(name = "filename") var name: String, + @ColumnInfo(name = "full_path") var path: String, + @ColumnInfo(name = "parent_path") var parentPath: String, + @ColumnInfo(name = "last_modified") val modified: Long, + @ColumnInfo(name = "date_taken") var taken: Long, + @ColumnInfo(name = "size") val size: Long, + @ColumnInfo(name = "type") val type: Int, + @ColumnInfo(name = "video_duration") val videoDuration: Int, + @ColumnInfo(name = "is_favorite") var isFavorite: Boolean, + @ColumnInfo(name = "deleted_ts") var deletedTS: Long) : Serializable, ThumbnailItem() { companion object { private const val serialVersionUID = -6553149366975655L