feat: add UIChatListChanged and UIChatListItemChanged events

This commit is contained in:
Simon Laux
2023-06-15 15:05:41 +02:00
parent 924d5b9377
commit a048d6b0d1
18 changed files with 173 additions and 4 deletions

View File

@@ -290,6 +290,9 @@ pub async fn send_locations_to_chat(
chat::add_info_msg(context, chat_id, &stock_str, now).await?;
}
context.emit_event(EventType::ChatModified(chat_id));
context.emit_event(EventType::UIChatListItemChanged {
chat_id: Some(chat_id),
});
if 0 != seconds {
context.scheduler.interrupt_location().await;
}
@@ -787,6 +790,9 @@ async fn maybe_send_locations(context: &Context) -> Result<Option<u64>> {
let stock_str = stock_str::msg_location_disabled(context).await;
chat::add_info_msg(context, chat_id, &stock_str, now).await?;
context.emit_event(EventType::ChatModified(chat_id));
context.emit_event(EventType::UIChatListItemChanged {
chat_id: Some(chat_id),
});
}
}