Skip to content

Commit

Permalink
added close command
Browse files Browse the repository at this point in the history
  • Loading branch information
Somfic committed May 9, 2024
1 parent 9ea0add commit 3d63e4e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ fn show_window(window: Window) {

#[tauri::command]
async fn update_later(window: Window) -> Result<(), ()> {
close(&window);

close_window(window).await?;
Ok(())
}

fn close(window: &Window) {
#[tauri::command]
async fn close_window(window: Window) -> Result<(), ()> {
window.close().unwrap();
std::process::exit(0);
}
Expand All @@ -152,7 +152,8 @@ fn main() {
show_window,
get_new_version,
update_now,
update_later
update_later,
close_window
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
Expand Down

0 comments on commit 3d63e4e

Please sign in to comment.