fix, separate window, event stream leak

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-08-07 09:01:31 +08:00
parent 6111042907
commit 7dcb28ce33
8 changed files with 41 additions and 26 deletions

View File

@@ -368,6 +368,7 @@ fn push_event_to_ui(channel: u16, peer: &str, content: &str) {
m.insert("peer", &peer);
m.insert("content", &content);
let event = serde_json::to_string(&m).unwrap_or("".to_string());
// Send to main and cm
for (k, v) in MSG_TO_UI_FLUTTER_CHANNELS.iter() {
if channel & k != 0 {
let _res = flutter::push_global_event(v as _, event.to_string());