mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix formatting
This commit is contained in:
@@ -805,7 +805,9 @@ impl Contact {
|
||||
// update the chats the contact that changed their name is part of
|
||||
// (treefit): could make sense to only update chats where the last message is from the contact, but the db query for that is more expensive
|
||||
for chat_id in Contact::get_chats_with_contact(context, &contact_id).await? {
|
||||
context.emit_event(EventType::UIChatListItemChanged { chat_id: Some(chat_id) });
|
||||
context.emit_event(EventType::UIChatListItemChanged {
|
||||
chat_id: Some(chat_id),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1611,6 +1613,7 @@ pub(crate) async fn set_profile_image(
|
||||
if changed {
|
||||
contact.update_param(context).await?;
|
||||
context.emit_event(EventType::ContactsChanged(Some(contact_id)));
|
||||
// TODO update DM chat
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -1817,6 +1820,7 @@ impl RecentlySeenLoop {
|
||||
// Timeout, notify about contact.
|
||||
if let Some(contact_id) = contact_id {
|
||||
context.emit_event(EventType::ContactsChanged(Some(*contact_id)));
|
||||
// TODO update DM chat
|
||||
unseen_queue.pop();
|
||||
}
|
||||
}
|
||||
@@ -1846,6 +1850,7 @@ impl RecentlySeenLoop {
|
||||
// Event is already in the past.
|
||||
if let Some(contact_id) = contact_id {
|
||||
context.emit_event(EventType::ContactsChanged(Some(*contact_id)));
|
||||
// TODO update DM chat
|
||||
}
|
||||
unseen_queue.pop();
|
||||
}
|
||||
|
||||
@@ -285,8 +285,8 @@ pub enum EventType {
|
||||
|
||||
/// Inform UI that a single chat list item changed and needs to be rerendered
|
||||
/// If `chat_id` is set to None, then all currently visible chats need to be rerendered, and all not-visible items need to be cleared from cache if the UI has a cache.
|
||||
UIChatListItemChanged {
|
||||
UIChatListItemChanged {
|
||||
/// ID of the changed chat
|
||||
chat_id: Option<ChatId>
|
||||
chat_id: Option<ChatId>,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -698,7 +698,9 @@ impl Peerstate {
|
||||
context.emit_event(EventType::UIChatListChanged);
|
||||
// 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) });
|
||||
context.emit_event(EventType::UIChatListItemChanged {
|
||||
chat_id: Some(chat_id),
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user