diff --git a/app/src/main/java/com/nextcloud/talk/newarch/local/dao/ConversationsDao.kt b/app/src/main/java/com/nextcloud/talk/newarch/local/dao/ConversationsDao.kt index 36d8d518f..9999fd942 100644 --- a/app/src/main/java/com/nextcloud/talk/newarch/local/dao/ConversationsDao.kt +++ b/app/src/main/java/com/nextcloud/talk/newarch/local/dao/ConversationsDao.kt @@ -30,7 +30,7 @@ abstract class ConversationsDao { @Query("SELECT * FROM conversations WHERE user_id = :userId ORDER BY favorite DESC, last_activity DESC") abstract fun getConversationsForUser(userId: Long): LiveData> - @Query("SELECT * FROM conversations WHERE user_id = :userId ORDER BY last_activity DESC LIMIT 3") + @Query("SELECT * FROM conversations WHERE user_id = :userId ORDER BY favorite DESC, last_activity DESC LIMIT 3") abstract fun getLastThreeConversationsForUser(userId: Long): LiveData> @Query("DELETE FROM conversations WHERE user_id = :userId")