GitOrigin-RevId: cbffbf1a1918a86140c1b4b06a9e8a97627d46d3
This commit is contained in:
levlam 2020-03-19 02:53:04 +03:00
parent 9d1e3ed661
commit f14b83f367

View File

@ -8791,7 +8791,6 @@ void MessagesManager::delete_dialog_history(DialogId dialog_id, bool remove_from
} }
auto dialog_type = dialog_id.get_type(); auto dialog_type = dialog_id.get_type();
bool is_secret = false;
switch (dialog_type) { switch (dialog_type) {
case DialogType::User: case DialogType::User:
case DialogType::Chat: case DialogType::Chat:
@ -8806,7 +8805,6 @@ void MessagesManager::delete_dialog_history(DialogId dialog_id, bool remove_from
} }
break; break;
case DialogType::SecretChat: case DialogType::SecretChat:
is_secret = true;
// ok // ok
break; break;
case DialogType::None: case DialogType::None:
@ -8816,7 +8814,7 @@ void MessagesManager::delete_dialog_history(DialogId dialog_id, bool remove_from
} }
auto last_new_message_id = d->last_new_message_id; auto last_new_message_id = d->last_new_message_id;
if (!is_secret && last_new_message_id == MessageId()) { if (dialog_type != DialogType::SecretChat && last_new_message_id == MessageId()) {
// TODO get dialog from the server and delete history from last message id // TODO get dialog from the server and delete history from last message id
} }