From 61c4db155d74b3ec913735577d5d30cb430f1784 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 25 Jan 2020 09:39:56 +0100 Subject: [PATCH] removing the favorite paths getting function from MediumDao --- .../com/simplemobiletools/gallery/pro/extensions/Context.kt | 2 +- .../com/simplemobiletools/gallery/pro/interfaces/MediumDao.kt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index c597a6f0d..cd098f6cd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -712,7 +712,7 @@ fun Context.getOTGFolderChildrenNames(path: String) = getOTGFolderChildren(path) fun Context.getFavoritePaths(): ArrayList { return try { - galleryDB.MediumDao().getFavoritePaths() as ArrayList + galleryDB.FavoritesDAO().getValidFavoritePaths() as ArrayList } catch (e: Exception) { ArrayList() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/MediumDao.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/MediumDao.kt index 3f89a2f5d..1bf91b543 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/MediumDao.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/MediumDao.kt @@ -15,9 +15,6 @@ interface MediumDao { @Query("SELECT filename, full_path, parent_path, last_modified, date_taken, size, type, video_duration, is_favorite, deleted_ts FROM media WHERE deleted_ts = 0 AND is_favorite = 1") fun getFavorites(): List - @Query("SELECT full_path FROM media WHERE deleted_ts = 0 AND is_favorite = 1") - fun getFavoritePaths(): List - @Query("SELECT filename, full_path, parent_path, last_modified, date_taken, size, type, video_duration, is_favorite, deleted_ts FROM media WHERE deleted_ts != 0") fun getDeletedMedia(): List