chore: listen backend notification from Tauri (#1743)

This commit is contained in:
Nathan.fooo
2023-01-27 17:17:51 +08:00
committed by GitHub
parent 243a781b6c
commit 7a750e5255
27 changed files with 237 additions and 58 deletions

View File

@ -29,9 +29,10 @@ fn main() {
});
})
.setup(|app| {
let window = app.get_window("main").unwrap();
#[cfg(debug_assertions)]
window.open_devtools();
if cfg!(debug_assertions) {
let window = app.get_window("main").unwrap();
window.open_devtools();
}
Ok(())
})
.run(tauri::generate_context!())

View File

@ -5,7 +5,6 @@ use tauri::{AppHandle, Event, Manager, Wry};
#[allow(dead_code)]
pub const AF_EVENT: &str = "af-event";
#[allow(dead_code)]
pub const AF_NOTIFICATION: &str = "af-notification";
#[tracing::instrument(level = "trace")]