mirror of https://github.com/procxx/kepka.git
Fix fakeUnreadWhileOpened flag reset.
This commit is contained in:
parent
aa88ee6d88
commit
6022fa790e
|
@ -257,12 +257,14 @@ 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);
|
||||
const auto was = _activeChatEntry.current().key.history();
|
||||
const auto now = row.key.history();
|
||||
if (was && was != now) {
|
||||
was->setFakeUnreadWhileOpened(false);
|
||||
}
|
||||
_activeChatEntry = row;
|
||||
if (const auto history = row.key.history()) {
|
||||
history->setFakeUnreadWhileOpened(true);
|
||||
if (now) {
|
||||
now->setFakeUnreadWhileOpened(true);
|
||||
}
|
||||
if (session().supportMode()) {
|
||||
pushToChatEntryHistory(row);
|
||||
|
|
Loading…
Reference in New Issue