Skip to content

Commit

Permalink
Fix deep linking on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Aug 30, 2024
1 parent ab49f5a commit 436be3e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,15 @@ fn main() {
}

builder = builder
.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
.plugin(tauri_plugin_single_instance::init(|app, args, _cwd| {
if let Some(payload) = args.get(1) {
tracing::info!("Handling deep link from arg {payload}");
let payload = payload.clone();
tauri::async_runtime::spawn(api::utils::handle_command(
payload,
));
}

if let Some(win) = app.get_window("main") {
let _ = win.set_focus();
}
Expand Down

0 comments on commit 436be3e

Please sign in to comment.