1
0
Fork 1

Do not include chat requests in unread counts

(cherry picked from commit 236de7b64fbb92e8b91c88836eaf9a11a2a4c006)
This commit is contained in:
Stephen Paul Weber 2024-11-02 20:34:49 -05:00 committed by Arne
parent 4c2614534c
commit 52d8e508d5

View file

@ -240,13 +240,16 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
for (final var c : conversations) {
final var unread = c.unreadCount(xmppConnectionService);
if (selectedAccount == null || selectedAccount.getUuid().equals(c.getAccount().getUuid())) {
totalUnread += unread;
if (c.getMode() == Conversation.MODE_MULTI) {
channelUnread += unread;
if (c.isChatRequest(chatRequestsPref)) {
chatRequests++;
} else {
dmUnread += unread;
totalUnread += unread;
if (c.getMode() == Conversation.MODE_MULTI) {
channelUnread += unread;
} else {
dmUnread += unread;
}
}
if (c.isChatRequest(chatRequestsPref)) chatRequests++;
}
var accountUnread = accountUnreads.get(c.getAccount());
if (accountUnread == null) accountUnread = 0;