2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Encapsulated unreadCount and mute fields in History.

Support for hiding all muted chats from the list.
This commit is contained in:
John Preston
2016-04-11 14:59:01 +04:00
parent 03bbb2269d
commit e0d6a68554
26 changed files with 1323 additions and 962 deletions

View File

@@ -557,7 +557,7 @@ namespace {
if (!h->isEmpty()) {
h->clear(true);
}
if (hto->inChatList() && h->inChatList()) {
if (hto->inChatList(Dialogs::Mode::All) && h->inChatList(Dialogs::Mode::All)) {
App::removeDialog(h);
}
}
@@ -1137,8 +1137,8 @@ namespace {
} else {
if (channelHistory) {
channelHistory->messageWithIdDeleted(i->v);
if (channelHistory->unreadCount > 0 && i->v >= channelHistory->inboxReadBefore) {
channelHistory->setUnreadCount(channelHistory->unreadCount - 1);
if (channelHistory->unreadCount() > 0 && i->v >= channelHistory->inboxReadBefore) {
channelHistory->setUnreadCount(channelHistory->unreadCount() - 1);
}
}
}