mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 10:56:29 +03:00
add chatlist changed event
This commit is contained in:
@@ -96,6 +96,7 @@ async fn reset_tables(context: &Context, bits: i32) {
|
||||
chat_id: ChatId::new(0),
|
||||
msg_id: MsgId::new(0),
|
||||
});
|
||||
context.emit_event(EventType::ChatListChanged);
|
||||
}
|
||||
|
||||
async fn poke_eml_file(context: &Context, filename: impl AsRef<Path>) -> Result<()> {
|
||||
@@ -167,6 +168,7 @@ async fn poke_spec(context: &Context, spec: Option<&str>) -> bool {
|
||||
chat_id: ChatId::new(0),
|
||||
msg_id: MsgId::new(0),
|
||||
});
|
||||
context.emit_event(EventType::ChatListChanged);
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
@@ -114,6 +114,12 @@ fn receive_event(event: EventType) {
|
||||
yellow.paint(format!("Received CHAT_MODIFIED({})", chat))
|
||||
);
|
||||
}
|
||||
EventType::ChatListChanged(chat) => {
|
||||
info!(
|
||||
"{}",
|
||||
yellow.paint("Received CHAT_LIST_CHANGED")
|
||||
);
|
||||
}
|
||||
_ => {
|
||||
info!("Received {:?}", event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user