Fix pinned chat to supergroup upgrade bug.

Pinned chats were always updated in dialogs list, even after being
migrated to supergroups. That was bringing them back to chats list.
This commit is contained in:
John Preston 2017-05-24 22:54:41 +03:00
parent 9665d5cb45
commit 1cc5b224c7
1 changed files with 4 additions and 2 deletions

View File

@ -1859,12 +1859,14 @@ void History::setLastMessage(HistoryItem *msg) {
}
bool History::needUpdateInChatList() const {
if (inChatList(Dialogs::Mode::All) || isPinnedDialog()) {
if (inChatList(Dialogs::Mode::All)) {
return true;
} else if (peer->migrateTo()) {
return false;
} else if (isPinnedDialog()) {
return true;
}
return (!peer->isChannel() || peer->asChannel()->amIn());
return !peer->isChannel() || peer->asChannel()->amIn();
}
void History::setChatsListDate(const QDateTime &date) {