From 413dba4db5fd8dd91fa60f21aa7fe09277198504 Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Sun, 27 Aug 2023 22:34:53 +0200 Subject: [PATCH] Fix id conflict in feedsWithoutFolder query --- db/src/main/java/com/readrops/db/dao/newdao/NewFeedDao.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/src/main/java/com/readrops/db/dao/newdao/NewFeedDao.kt b/db/src/main/java/com/readrops/db/dao/newdao/NewFeedDao.kt index 450d7ddf..0f0493e2 100644 --- a/db/src/main/java/com/readrops/db/dao/newdao/NewFeedDao.kt +++ b/db/src/main/java/com/readrops/db/dao/newdao/NewFeedDao.kt @@ -21,7 +21,7 @@ abstract class NewFeedDao : NewBaseDao { @Query("Select case When :feedUrl In (Select url from Feed Where account_id = :accountId) Then 1 else 0 end") abstract suspend fun feedExists(feedUrl: String, accountId: Int): Boolean - @Query("Select *, count(*) as unreadCount From Feed Inner Join Item On Feed.id = Item.feed_id " + + @Query("Select Feed.*, count(*) as unreadCount From Feed Inner Join Item On Feed.id = Item.feed_id " + "Where Feed.folder_id is Null And Item.read = 0 And Feed.account_id = :accountId Group by Feed.id") abstract fun selectFeedsWithoutFolder(accountId: Int): Flow>