improve error handling
This commit is contained in:
parent
c9fa93de72
commit
355febf927
12 changed files with 443 additions and 258 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
use tauri::{State, Manager};
|
||||
use tauri::{Manager, State};
|
||||
|
||||
struct Received(AtomicBool);
|
||||
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
||||
|
@ -28,7 +28,10 @@ fn main() {
|
|||
|
||||
let app_handle = app.handle();
|
||||
app.listen_global("foo", move |_| {
|
||||
app_handle.state::<Received>().0.store(true, Ordering::Relaxed);
|
||||
app_handle
|
||||
.state::<Received>()
|
||||
.0
|
||||
.store(true, Ordering::Relaxed);
|
||||
});
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue