Fix unneded call to on_message_changed.

GitOrigin-RevId: 77ed3c201080d86a37698955ed4d17a9a6429e30
This commit is contained in:
levlam 2018-03-26 19:29:35 +03:00
parent 4fc2a51357
commit 372196280c

View File

@ -22392,11 +22392,14 @@ void MessagesManager::update_message(Dialog *d, unique_ptr<Message> &old_message
send_update_message_edited(dialog_id, old_message.get());
}
(void)is_changed;
// need to save message always, because it might be added to some message index
// if (is_changed) {
on_message_changed(d, old_message.get(), "update_message");
// }
if (is_changed) {
on_message_changed(d, old_message.get(), "update_message");
} else {
// need to save message always, because it might be added to some message index
if (!message_id.is_yet_unsent()) {
add_message_to_database(d, old_message.get(), "update_message");
}
}
}
bool MessagesManager::need_message_text_changed_warning(const Message *old_message, const MessageText *old_content,