Do not include chat requests in unread counts
(cherry picked from commit 236de7b64fbb92e8b91c88836eaf9a11a2a4c006)
This commit is contained in:
parent
4c2614534c
commit
52d8e508d5
1 changed files with 8 additions and 5 deletions
|
@ -240,13 +240,16 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
|
||||||
for (final var c : conversations) {
|
for (final var c : conversations) {
|
||||||
final var unread = c.unreadCount(xmppConnectionService);
|
final var unread = c.unreadCount(xmppConnectionService);
|
||||||
if (selectedAccount == null || selectedAccount.getUuid().equals(c.getAccount().getUuid())) {
|
if (selectedAccount == null || selectedAccount.getUuid().equals(c.getAccount().getUuid())) {
|
||||||
totalUnread += unread;
|
if (c.isChatRequest(chatRequestsPref)) {
|
||||||
if (c.getMode() == Conversation.MODE_MULTI) {
|
chatRequests++;
|
||||||
channelUnread += unread;
|
|
||||||
} else {
|
} 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());
|
var accountUnread = accountUnreads.get(c.getAccount());
|
||||||
if (accountUnread == null) accountUnread = 0;
|
if (accountUnread == null) accountUnread = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue