mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
emit MsgsChanged(chat_id, 0) on full downloads (#2696)
before, MsgsChanged(chat_id, new_msg_id) was emitted, but that does not cover the deleted message. in theory, we could emit both, however, that would just be a waste of refresh in uis. also before, events were used this way, however, also the documentations are updated to reflect reality better.
This commit is contained in:
@@ -327,7 +327,12 @@ pub(crate) async fn dc_receive_imf_inner(
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(create_event_to_send) = create_event_to_send {
|
||||
if replace_partial_download {
|
||||
context.emit_event(EventType::MsgsChanged {
|
||||
msg_id: MsgId::new(0),
|
||||
chat_id,
|
||||
});
|
||||
} else if let Some(create_event_to_send) = create_event_to_send {
|
||||
for (chat_id, msg_id) in created_db_entries {
|
||||
let event = match create_event_to_send {
|
||||
CreateEvent::MsgsChanged => EventType::MsgsChanged { msg_id, chat_id },
|
||||
|
||||
Reference in New Issue
Block a user