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

Remove locally saved empty histories.

This commit is contained in:
John Preston
2019-05-03 15:18:18 +04:00
parent 39b7f307a4
commit 0247e876df
10 changed files with 9 additions and 173 deletions

View File

@@ -2257,9 +2257,9 @@ void History::setChatListMessage(HistoryItem *item) {
}
const auto was = _chatListMessage.value_or(nullptr);
if (item) {
if (!_chatListMessage || !*_chatListMessage) {
Local::removeSavedPeer(peer);
} else if (!IsServerMsgId((*_chatListMessage)->id)
if (_chatListMessage
&& *_chatListMessage
&& !IsServerMsgId((*_chatListMessage)->id)
&& (*_chatListMessage)->date() > item->date()) {
return;
}