From 682abbf66bf0a09c250913147f37c17060022850 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 14 Nov 2017 11:47:15 -0800 Subject: [PATCH] Add unread count to synthesized cursor --- .../securesms/database/loaders/ConversationListLoader.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/database/loaders/ConversationListLoader.java b/src/org/thoughtcrime/securesms/database/loaders/ConversationListLoader.java index 0620f31785..f2dd7081cf 100644 --- a/src/org/thoughtcrime/securesms/database/loaders/ConversationListLoader.java +++ b/src/org/thoughtcrime/securesms/database/loaders/ConversationListLoader.java @@ -42,7 +42,7 @@ public class ConversationListLoader extends AbstractCursorLoader { if (archivedCount > 0) { MatrixCursor switchToArchiveCursor = new MatrixCursor(new String[] { ThreadDatabase.ID, ThreadDatabase.DATE, ThreadDatabase.MESSAGE_COUNT, - ThreadDatabase.ADDRESS, ThreadDatabase.SNIPPET, ThreadDatabase.READ, + ThreadDatabase.ADDRESS, ThreadDatabase.SNIPPET, ThreadDatabase.READ, ThreadDatabase.UNREAD_COUNT, ThreadDatabase.TYPE, ThreadDatabase.SNIPPET_TYPE, ThreadDatabase.SNIPPET_URI, ThreadDatabase.ARCHIVED, ThreadDatabase.STATUS, ThreadDatabase.DELIVERY_RECEIPT_COUNT, ThreadDatabase.EXPIRES_IN, ThreadDatabase.LAST_SEEN, ThreadDatabase.READ_RECEIPT_COUNT}, 1); @@ -50,12 +50,12 @@ public class ConversationListLoader extends AbstractCursorLoader { if (cursorList.get(0).getCount() <= 0) { switchToArchiveCursor.addRow(new Object[] {-1L, System.currentTimeMillis(), archivedCount, - "-1", null, 1, ThreadDatabase.DistributionTypes.INBOX_ZERO, + "-1", null, 1, 0, ThreadDatabase.DistributionTypes.INBOX_ZERO, 0, null, 0, -1, 0, 0, 0, -1}); } switchToArchiveCursor.addRow(new Object[] {-1L, System.currentTimeMillis(), archivedCount, - "-1", null, 1, ThreadDatabase.DistributionTypes.ARCHIVE, + "-1", null, 1, 0, ThreadDatabase.DistributionTypes.ARCHIVE, 0, null, 0, -1, 0, 0, 0, -1}); cursorList.add(switchToArchiveCursor);