streamline emitting MsgsChanged and IncomingMsg event to go through particular functions.

This commit is contained in:
holger krekel
2022-04-25 17:38:27 +02:00
parent d033dcf395
commit 369609b26c
8 changed files with 51 additions and 80 deletions

View File

@@ -1254,10 +1254,7 @@ pub async fn delete_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()> {
}
if !msg_ids.is_empty() {
context.emit_event(EventType::MsgsChanged {
chat_id: ChatId::new(0),
msg_id: MsgId::new(0),
});
context.emit_msgs_changed_without_ids();
// Run housekeeping to delete unused blobs.
context.set_config(Config::LastHousekeeping, None).await?;