wip: migrate to desktop2

This commit is contained in:
2024-02-12 20:04:45 +07:00
parent 1950cb59a2
commit ed52105c02
18 changed files with 172 additions and 177 deletions

View File

@@ -164,8 +164,14 @@ fn main() {
commands::folder::show_in_folder,
commands::opg::fetch_opg,
])
.run(ctx)
.expect("error while running tauri application");
.build(ctx)
.expect("error while running tauri application")
.run(|_app_handle, event| match event {
tauri::RunEvent::ExitRequested { api, .. } => {
api.prevent_exit();
}
_ => {}
});
}
fn get_nsec_paths(dir: &Path) -> Result<Vec<PathBuf>, Box<dyn Error>> {