api: add ChatListChanged and ChatListItemChanged events (#4476)

This commit is contained in:
Simon Laux
2024-04-16 00:35:19 +02:00
committed by GitHub
parent 489eae5d66
commit f9465f7512
27 changed files with 1021 additions and 12 deletions

View File

@@ -291,4 +291,15 @@ pub enum EventType {
///
/// This event is only emitted by the account manager
AccountsBackgroundFetchDone,
/// Inform that set of chats or the order of the chats in the chatlist has changed.
///
/// Sometimes this is emitted together with `UIChatlistItemChanged`.
ChatlistChanged,
/// Inform 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.
ChatlistItemChanged {
/// ID of the changed chat
chat_id: Option<ChatId>,
},
}