mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 20:45:17 +00:00
fix: message request banner shows again
This commit is contained in:
parent
21e747ee99
commit
c2763de664
@ -449,9 +449,9 @@ public class ThreadDatabase extends Database {
|
|||||||
" ON " + TABLE_NAME + "." + ADDRESS + " = " + RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.ADDRESS +
|
" ON " + TABLE_NAME + "." + ADDRESS + " = " + RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.ADDRESS +
|
||||||
" LEFT OUTER JOIN " + GroupDatabase.TABLE_NAME +
|
" LEFT OUTER JOIN " + GroupDatabase.TABLE_NAME +
|
||||||
" ON " + TABLE_NAME + "." + ADDRESS + " = " + GroupDatabase.TABLE_NAME + "." + GROUP_ID +
|
" ON " + TABLE_NAME + "." + ADDRESS + " = " + GroupDatabase.TABLE_NAME + "." + GROUP_ID +
|
||||||
" WHERE " + MESSAGE_COUNT + " != 0 AND " + ARCHIVED + " = 0 AND " + HAS_SENT + " = 0 AND " + MESSAGE_COUNT + " = " + UNREAD_COUNT + " AND " +
|
" WHERE " + MESSAGE_COUNT + " != 0 AND " + ARCHIVED + " = 0 AND " + HAS_SENT + " = 0 AND " +
|
||||||
RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.BLOCK + " = 0 AND " +
|
|
||||||
RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.APPROVED + " = 0 AND " +
|
RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.APPROVED + " = 0 AND " +
|
||||||
|
RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.BLOCK + " = 0 AND " +
|
||||||
GroupDatabase.TABLE_NAME + "." + GROUP_ID + " IS NULL";
|
GroupDatabase.TABLE_NAME + "." + GROUP_ID + " IS NULL";
|
||||||
cursor = db.rawQuery(query, null);
|
cursor = db.rawQuery(query, null);
|
||||||
|
|
||||||
@ -766,12 +766,10 @@ public class ThreadDatabase extends Database {
|
|||||||
updateThread(threadId, count, getFormattedBodyFor(record), getAttachmentUriFor(record),
|
updateThread(threadId, count, getFormattedBodyFor(record), getAttachmentUriFor(record),
|
||||||
record.getTimestamp(), record.getDeliveryStatus(), record.getDeliveryReceiptCount(),
|
record.getTimestamp(), record.getDeliveryStatus(), record.getDeliveryReceiptCount(),
|
||||||
record.getType(), unarchive, record.getExpiresIn(), record.getReadReceiptCount());
|
record.getType(), unarchive, record.getExpiresIn(), record.getReadReceiptCount());
|
||||||
notifyConversationListListeners();
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (shouldDeleteEmptyThread) {
|
if (shouldDeleteEmptyThread) {
|
||||||
deleteThread(threadId);
|
deleteThread(threadId);
|
||||||
notifyConversationListListeners();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -779,6 +777,7 @@ public class ThreadDatabase extends Database {
|
|||||||
} finally {
|
} finally {
|
||||||
if (reader != null)
|
if (reader != null)
|
||||||
reader.close();
|
reader.close();
|
||||||
|
notifyConversationListListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,6 @@ class BatchMessageReceiveJob(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (threadId == NO_THREAD_MAPPING) return@async
|
|
||||||
// increment unreads, notify, and update thread
|
// increment unreads, notify, and update thread
|
||||||
// last seen will be the current last seen if not changed (re-computes the read counts for thread record)
|
// last seen will be the current last seen if not changed (re-computes the read counts for thread record)
|
||||||
// might have been updated from a different thread at this point
|
// might have been updated from a different thread at this point
|
||||||
|
Loading…
Reference in New Issue
Block a user