mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Add unread count to synthesized cursor
This commit is contained in:
parent
1986e58c5f
commit
682abbf66b
@ -42,7 +42,7 @@ public class ConversationListLoader extends AbstractCursorLoader {
|
|||||||
if (archivedCount > 0) {
|
if (archivedCount > 0) {
|
||||||
MatrixCursor switchToArchiveCursor = new MatrixCursor(new String[] {
|
MatrixCursor switchToArchiveCursor = new MatrixCursor(new String[] {
|
||||||
ThreadDatabase.ID, ThreadDatabase.DATE, ThreadDatabase.MESSAGE_COUNT,
|
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.TYPE, ThreadDatabase.SNIPPET_TYPE, ThreadDatabase.SNIPPET_URI,
|
||||||
ThreadDatabase.ARCHIVED, ThreadDatabase.STATUS, ThreadDatabase.DELIVERY_RECEIPT_COUNT,
|
ThreadDatabase.ARCHIVED, ThreadDatabase.STATUS, ThreadDatabase.DELIVERY_RECEIPT_COUNT,
|
||||||
ThreadDatabase.EXPIRES_IN, ThreadDatabase.LAST_SEEN, ThreadDatabase.READ_RECEIPT_COUNT}, 1);
|
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) {
|
if (cursorList.get(0).getCount() <= 0) {
|
||||||
switchToArchiveCursor.addRow(new Object[] {-1L, System.currentTimeMillis(), archivedCount,
|
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});
|
0, null, 0, -1, 0, 0, 0, -1});
|
||||||
}
|
}
|
||||||
|
|
||||||
switchToArchiveCursor.addRow(new Object[] {-1L, System.currentTimeMillis(), archivedCount,
|
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});
|
0, null, 0, -1, 0, 0, 0, -1});
|
||||||
|
|
||||||
cursorList.add(switchToArchiveCursor);
|
cursorList.add(switchToArchiveCursor);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user