mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +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
|
// 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
|
// (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? {
|
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 {
|
if changed {
|
||||||
contact.update_param(context).await?;
|
contact.update_param(context).await?;
|
||||||
context.emit_event(EventType::ContactsChanged(Some(contact_id)));
|
context.emit_event(EventType::ContactsChanged(Some(contact_id)));
|
||||||
|
// TODO update DM chat
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -1817,6 +1820,7 @@ impl RecentlySeenLoop {
|
|||||||
// Timeout, notify about contact.
|
// Timeout, notify about contact.
|
||||||
if let Some(contact_id) = contact_id {
|
if let Some(contact_id) = contact_id {
|
||||||
context.emit_event(EventType::ContactsChanged(Some(*contact_id)));
|
context.emit_event(EventType::ContactsChanged(Some(*contact_id)));
|
||||||
|
// TODO update DM chat
|
||||||
unseen_queue.pop();
|
unseen_queue.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1846,6 +1850,7 @@ impl RecentlySeenLoop {
|
|||||||
// Event is already in the past.
|
// Event is already in the past.
|
||||||
if let Some(contact_id) = contact_id {
|
if let Some(contact_id) = contact_id {
|
||||||
context.emit_event(EventType::ContactsChanged(Some(*contact_id)));
|
context.emit_event(EventType::ContactsChanged(Some(*contact_id)));
|
||||||
|
// TODO update DM chat
|
||||||
}
|
}
|
||||||
unseen_queue.pop();
|
unseen_queue.pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -287,6 +287,6 @@ pub enum EventType {
|
|||||||
/// 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.
|
/// 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
|
/// ID of the changed chat
|
||||||
chat_id: Option<ChatId>
|
chat_id: Option<ChatId>,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -698,7 +698,9 @@ impl Peerstate {
|
|||||||
context.emit_event(EventType::UIChatListChanged);
|
context.emit_event(EventType::UIChatListChanged);
|
||||||
// update the chats the contact is part of
|
// update the chats the contact is part of
|
||||||
for chat_id in Contact::get_chats_with_contact(context, &contact_id).await? {
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user