refactor: add emit_msgs_changed_without_msg_id

Added debug assertions to make sure
MsgsChanged is not emitted with 0 IDs by accident.
This commit is contained in:
link2xt
2024-12-24 19:54:28 +00:00
committed by l
parent 779635d73b
commit 1089aea8e0
5 changed files with 37 additions and 16 deletions

View File

@@ -607,7 +607,7 @@ pub(crate) async fn receive_imf_inner(
}
if let Some(replace_chat_id) = replace_chat_id {
context.emit_msgs_changed(replace_chat_id, MsgId::new(0));
context.emit_msgs_changed_without_msg_id(replace_chat_id);
} else if !chat_id.is_trash() {
let fresh = received_msg.state == MessageState::InFresh;
for msg_id in &received_msg.msg_ids {