Skip to content

Commit

Permalink
Merge branch 'tauri' of https://github.com/1111mp/nvm-desktop into tauri
Browse files Browse the repository at this point in the history
  • Loading branch information
1111mp committed Nov 7, 2024
2 parents d04a59c + 39ebbf5 commit a7f19d6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src-tauri/src/utils/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ pub fn init() -> Result<()> {
tauri::async_runtime::spawn(async {
if let Err(err) = update_schema().await {
log::error!(target: "migrate", "{err}");
}
// Delay 1s before sending events to the window
sleep(Duration::from_secs(1)).await;
if let Some(window) = handle::Handle::global().get_window() {
let _ = window.emit("app-migration-error", ());

// Delay 1s before sending events to the window
sleep(Duration::from_secs(1)).await;
if let Some(window) = handle::Handle::global().get_window() {
let _ = window.emit("app-migration-error", ());
}
}
});

Expand Down

0 comments on commit a7f19d6

Please sign in to comment.