emit exact chatid events in contact aeap and contact name change

This commit is contained in:
Simon Laux
2023-06-15 17:43:34 +02:00
parent 6442e13a1a
commit f4caf1688b
2 changed files with 39 additions and 5 deletions

View File

@@ -696,7 +696,10 @@ impl Peerstate {
}
context.emit_event(EventType::UIChatListChanged);
context.emit_event(EventType::UIChatListItemChanged { chat_id: None });
// update the chats the contact is part of
for chat_id in Contact::get_chats_with_contact(context, &contact_id).await? {
context.emit_event(EventType::UIChatListItemChanged { chat_id: Some(chat_id) });
}
Ok(())
}