2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Leave unread chats in filter until closed.

This commit is contained in:
John Preston
2020-03-20 19:19:55 +04:00
parent 1be6d968e0
commit 3ac33e4c1c
5 changed files with 29 additions and 1 deletions

View File

@@ -257,7 +257,13 @@ const rpl::variable<Data::Folder*> &SessionController::openedFolder() const {
}
void SessionController::setActiveChatEntry(Dialogs::RowDescriptor row) {
if (const auto history = _activeChatEntry.current().key.history()) {
history->setFakeUnreadWhileOpened(false);
}
_activeChatEntry = row;
if (const auto history = row.key.history()) {
history->setFakeUnreadWhileOpened(true);
}
if (session().supportMode()) {
pushToChatEntryHistory(row);
}