mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 08:55:59 +00:00
Refresh filter chats count in filter settings.
This commit is contained in:
@@ -67,7 +67,7 @@ Folder::Folder(not_null<Data::Session*> owner, FolderId id)
|
||||
for (const auto history : _lastHistories) {
|
||||
if (history->peer == update.peer) {
|
||||
++_chatListViewVersion;
|
||||
updateChatListEntry();
|
||||
updateChatListEntryPostponed();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -81,15 +81,26 @@ Folder::Folder(not_null<Data::Session*> owner, FolderId id)
|
||||
}) | rpl::start_with_next([=](const Dialogs::UnreadState &old) {
|
||||
++_chatListViewVersion;
|
||||
notifyUnreadStateChange(old);
|
||||
updateChatListEntry();
|
||||
updateChatListEntryPostponed();
|
||||
}, _lifetime);
|
||||
|
||||
_chatsList.fullSize().changes(
|
||||
) | rpl::start_with_next([=] {
|
||||
updateChatListEntry();
|
||||
updateChatListEntryPostponed();
|
||||
}, _lifetime);
|
||||
}
|
||||
|
||||
void Folder::updateChatListEntryPostponed() {
|
||||
if (_updateChatListEntryPostponed) {
|
||||
return;
|
||||
}
|
||||
_updateChatListEntryPostponed = true;
|
||||
Ui::PostponeCall(this, [=] {
|
||||
updateChatListEntry();
|
||||
_updateChatListEntryPostponed = false;
|
||||
});
|
||||
}
|
||||
|
||||
FolderId Folder::id() const {
|
||||
return _id;
|
||||
}
|
||||
|
Reference in New Issue
Block a user