diff --git a/app/src/main/kotlin/com/hippo/ehviewer/dao/HistoryDao.kt b/app/src/main/kotlin/com/hippo/ehviewer/dao/HistoryDao.kt index b56833ec8..b1b679331 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/dao/HistoryDao.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/dao/HistoryDao.kt @@ -10,7 +10,7 @@ import com.hippo.ehviewer.client.data.BaseGalleryInfo @Dao interface HistoryDao { - @Query("SELECT * FROM HISTORY ORDER BY TIME") + @Query("SELECT HISTORY.* FROM HISTORY JOIN GALLERIES USING(GID) ORDER BY TIME") suspend fun list(): List @Query("SELECT GALLERIES.* FROM HISTORY JOIN GALLERIES USING(GID) ORDER BY TIME DESC") diff --git a/app/src/main/kotlin/com/hippo/ehviewer/dao/LocalFavoritesDao.kt b/app/src/main/kotlin/com/hippo/ehviewer/dao/LocalFavoritesDao.kt index 11099f119..777d18c9d 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/dao/LocalFavoritesDao.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/dao/LocalFavoritesDao.kt @@ -14,7 +14,7 @@ interface LocalFavoritesDao { @Query("SELECT COUNT(*) FROM LOCAL_FAVORITES") fun count(): Flow - @Query("SELECT * FROM LOCAL_FAVORITES ORDER BY TIME") + @Query("SELECT LOCAL_FAVORITES.* FROM LOCAL_FAVORITES JOIN GALLERIES USING(GID) ORDER BY TIME") suspend fun list(): List @Query("SELECT GALLERIES.* FROM LOCAL_FAVORITES JOIN GALLERIES USING(GID) ORDER BY TIME DESC")