Change shortcut identifier when moving local messages between shortcuts.

This commit is contained in:
levlam 2024-04-18 16:54:57 +03:00
parent 2f9dcae107
commit 0af52ba4fd

View File

@ -1029,6 +1029,10 @@ void QuickReplyManager::on_reload_quick_reply_shortcuts(
<< shortcut->shortcut_id_;
CHECK(shortcut->local_total_count_ == 0);
shortcut->local_total_count_ = static_cast<int32>(old_shortcut->messages_.size());
for (auto &message : old_shortcut->messages_) {
CHECK(message->shortcut_id == shortcut_id);
message->shortcut_id = shortcut->shortcut_id_;
}
append(shortcut->messages_, std::move(old_shortcut->messages_));
sort_quick_reply_messages(shortcut->messages_);
send_update_quick_reply_shortcut_deleted(old_shortcut);