From 4cfa9e6165322ec0b1cb75b085b82544742b0c04 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 13 Feb 2020 19:31:57 +0100 Subject: [PATCH] send event as before, uis depend on that --- src/chat.rs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 784fd2e51..8eec9c1ab 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -148,17 +148,14 @@ impl ChatId { self ); - let send_event = if visibility == ChatVisibility::Archived { + if visibility == ChatVisibility::Archived { sql::execute( context, &context.sql, "UPDATE msgs SET state=? WHERE chat_id=? AND state=?;", params![MessageState::InNoticed, self, MessageState::InFresh], )?; - true - } else { - false - }; + } sql::execute( context, @@ -167,12 +164,10 @@ impl ChatId { params![visibility, self], )?; - if send_event { - context.call_cb(Event::MsgsChanged { - msg_id: MsgId::new(0), - chat_id: ChatId::new(0), - }); - } + context.call_cb(Event::MsgsChanged { + msg_id: MsgId::new(0), + chat_id: ChatId::new(0), + }); Ok(()) }