Skip to content

Commit 1f5cdc4

Browse files
committed
fix formatting
1 parent 8ab993a commit 1f5cdc4

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/contact.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,9 @@ impl Contact {
715715
// update the chats the contact that changed their name is part of
716716
// (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
717717
for chat_id in Contact::get_chats_with_contact(context, &contact_id).await? {
718-
context.emit_event(EventType::UIChatListItemChanged { chat_id: Some(chat_id) });
718+
context.emit_event(EventType::UIChatListItemChanged {
719+
chat_id: Some(chat_id),
720+
});
719721
}
720722
}
721723

@@ -1446,6 +1448,7 @@ pub(crate) async fn set_profile_image(
14461448
if changed {
14471449
contact.update_param(context).await?;
14481450
context.emit_event(EventType::ContactsChanged(Some(contact_id)));
1451+
// TODO update DM chat
14491452
}
14501453
Ok(())
14511454
}
@@ -1652,6 +1655,7 @@ impl RecentlySeenLoop {
16521655
// Timeout, notify about contact.
16531656
if let Some(contact_id) = contact_id {
16541657
context.emit_event(EventType::ContactsChanged(Some(*contact_id)));
1658+
// TODO update DM chat
16551659
unseen_queue.pop();
16561660
}
16571661
}
@@ -1681,6 +1685,7 @@ impl RecentlySeenLoop {
16811685
// Event is already in the past.
16821686
if let Some(contact_id) = contact_id {
16831687
context.emit_event(EventType::ContactsChanged(Some(*contact_id)));
1688+
// TODO update DM chat
16841689
}
16851690
unseen_queue.pop();
16861691
}

src/events/payload.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ pub enum EventType {
284284

285285
/// Inform UI that a single chat list item changed and needs to be rerendered
286286
/// 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.
287-
UIChatListItemChanged {
287+
UIChatListItemChanged {
288288
/// ID of the changed chat
289-
chat_id: Option<ChatId>
289+
chat_id: Option<ChatId>,
290290
},
291291
}

src/peerstate.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ impl Peerstate {
620620
context.emit_event(EventType::UIChatListChanged);
621621
// update the chats the contact is part of
622622
for chat_id in Contact::get_chats_with_contact(context, &contact_id).await? {
623-
context.emit_event(EventType::UIChatListItemChanged { chat_id: Some(chat_id) });
623+
context.emit_event(EventType::UIChatListItemChanged {
624+
chat_id: Some(chat_id),
625+
});
624626
}
625627
Ok(())
626628
}

0 commit comments

Comments
 (0)