mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
send event as before, uis depend on that
This commit is contained in:
17
src/chat.rs
17
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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user