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:
parent
9665d5cb45
commit
1cc5b224c7
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue