mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +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
|
self
|
||||||
);
|
);
|
||||||
|
|
||||||
let send_event = if visibility == ChatVisibility::Archived {
|
if visibility == ChatVisibility::Archived {
|
||||||
sql::execute(
|
sql::execute(
|
||||||
context,
|
context,
|
||||||
&context.sql,
|
&context.sql,
|
||||||
"UPDATE msgs SET state=? WHERE chat_id=? AND state=?;",
|
"UPDATE msgs SET state=? WHERE chat_id=? AND state=?;",
|
||||||
params![MessageState::InNoticed, self, MessageState::InFresh],
|
params![MessageState::InNoticed, self, MessageState::InFresh],
|
||||||
)?;
|
)?;
|
||||||
true
|
}
|
||||||
} else {
|
|
||||||
false
|
|
||||||
};
|
|
||||||
|
|
||||||
sql::execute(
|
sql::execute(
|
||||||
context,
|
context,
|
||||||
@@ -167,12 +164,10 @@ impl ChatId {
|
|||||||
params![visibility, self],
|
params![visibility, self],
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
if send_event {
|
context.call_cb(Event::MsgsChanged {
|
||||||
context.call_cb(Event::MsgsChanged {
|
msg_id: MsgId::new(0),
|
||||||
msg_id: MsgId::new(0),
|
chat_id: ChatId::new(0),
|
||||||
chat_id: ChatId::new(0),
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user