fix: make event loop in tray compatible with main window

This commit is contained in:
Kingtous
2023-05-02 12:52:27 +08:00
parent 4e7a8065b9
commit 7a82070420
8 changed files with 45 additions and 23 deletions

View File

@@ -454,7 +454,7 @@ pub async fn start_ipc_url_server() {
let mut m = HashMap::new();
m.insert("name", "on_url_scheme_received");
m.insert("url", url.as_str());
let event = serde_json::to_string(&m).unwrap();
let event = serde_json::to_string(&m).unwrap_or("".to_owned());
match crate::flutter::push_global_event(crate::flutter::APP_TYPE_MAIN, event) {
None => log::warn!("No main window app found!"),
Some(..) => {}