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

@@ -719,9 +719,6 @@ void ApiWrap::requestDialogs(Data::Folder *folder) {
void ApiWrap::requestMoreDialogs(Data::Folder *folder) {
const auto state = dialogsLoadState(folder);
if (!state) {
if (!folder) {
_session->data().addAllSavedPeers();
}
return;
} else if (state->requestId) {
return;
@@ -2444,9 +2441,6 @@ void ApiWrap::clearHistory(not_null<PeerData*> peer, bool revoke) {
if (const auto last = history->lastMessage()) {
deleteTillId = last->id;
}
if (const auto last = history->chatListMessage()) {
Local::addSavedPeer(history->peer, ItemDateTime(last));
}
history->clear(History::ClearType::ClearHistory);
}
if (const auto channel = peer->asChannel()) {