mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Mark messages read properly in private conversation.
This commit is contained in:
@@ -153,8 +153,9 @@ public abstract class BdfIncomingMessageHook implements IncomingMessageHook,
|
||||
// update unread counter in group metadata
|
||||
GroupCount c = getGroupCount(txn, g);
|
||||
BdfDictionary d = new BdfDictionary();
|
||||
d.put(GROUP_KEY_UNREAD_COUNT,
|
||||
c.getUnreadCount() + (read ? -1 : 1));
|
||||
int count = c.getUnreadCount() + (read ? -1 : 1);
|
||||
if (count < 0) throw new DbException();
|
||||
d.put(GROUP_KEY_UNREAD_COUNT, count);
|
||||
clientHelper.mergeGroupMetadata(txn, g, d);
|
||||
}
|
||||
db.commitTransaction(txn);
|
||||
|
||||
Reference in New Issue
Block a user