From 1a5ec41f8b20482af1151b5c618e1dea60aeb857 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 20 Apr 2018 21:01:55 +0200 Subject: [PATCH] do not select ID at directories and media, for proper old/new comparing --- .../com/simplemobiletools/gallery/interfaces/DirectoryDao.kt | 2 +- .../com/simplemobiletools/gallery/interfaces/MediumDao.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/DirectoryDao.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/DirectoryDao.kt index ed84a1319..6b6d0580b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/DirectoryDao.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/DirectoryDao.kt @@ -9,7 +9,7 @@ import com.simplemobiletools.gallery.models.Directory @Dao interface DirectoryDao { - @Query("SELECT * FROM directories") + @Query("SELECT path, thumbnail, filename, media_count, last_modified, date_taken, size, is_on_sd_card FROM directories") fun getAll(): List @Insert(onConflict = REPLACE) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/MediumDao.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/MediumDao.kt index c27a14dda..51d8d3b77 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/MediumDao.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/MediumDao.kt @@ -11,7 +11,7 @@ interface MediumDao { @Query("SELECT * FROM media") fun getAll(): List - @Query("SELECT * FROM media WHERE parent_path = :path") + @Query("SELECT filename, full_path, parent_path, last_modified, date_taken, size, type FROM media WHERE parent_path = :path") fun getMediaFromPath(path: String): List @Insert(onConflict = REPLACE)