--- a/app/src/main/java/com/geekorum/ttrss/data/ArticleDao.kt Sat May 09 22:38:05 2020 -0400
+++ b/app/src/main/java/com/geekorum/ttrss/data/ArticleDao.kt Fri May 15 16:58:27 2020 -0400
@@ -96,4 +96,13 @@
+ "WHERE ArticleFTS MATCH :query "
+ "ORDER BY last_time_update DESC")
fun searchArticles(query: String?): DataSource.Factory<Int, Article>
+
+ @Query("SELECT tag FROM articles_tags " +
+ " JOIN articles ON (articles_tags.article_id = articles._id)" +
+ " WHERE articles.unread=1" +
+ " GROUP BY tag" +
+ " ORDER BY COUNT(article_id) DESC" +
+ " LIMIT :count ")
+ suspend fun getMostUnreadTags(count: Int): List<String>
+
}