From 95948b49b24b0f1e71b3ecae3c542cc99281dd64 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Tue, 7 Nov 2023 09:51:44 +0530 Subject: [PATCH] fix: remember last window state --- .../src-tauri/src/main.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/hoppscotch-selfhost-desktop/src-tauri/src/main.rs b/packages/hoppscotch-selfhost-desktop/src-tauri/src/main.rs index 5662b67a5..34171068b 100644 --- a/packages/hoppscotch-selfhost-desktop/src-tauri/src/main.rs +++ b/packages/hoppscotch-selfhost-desktop/src-tauri/src/main.rs @@ -21,6 +21,8 @@ fn main() { tauri_plugin_deep_link::prepare("io.hoppscotch.desktop"); tauri::Builder::default() + .plugin(tauri_plugin_window_state::Builder::default().build()) + .plugin(tauri_plugin_store::Builder::default().build()) .setup(|app| { if cfg!(target_os = "macos") { #[cfg(target_os = "macos")] @@ -37,17 +39,14 @@ fn main() { } let handle = app.handle(); - tauri_plugin_deep_link::register( - "hoppscotch", - move |request| { - println!("{:?}", request); - handle.emit_all("scheme-request-received", request).unwrap(); - }, - ).unwrap(); + tauri_plugin_deep_link::register("hoppscotch", move |request| { + println!("{:?}", request); + handle.emit_all("scheme-request-received", request).unwrap(); + }) + .unwrap(); Ok(()) }) - .plugin(tauri_plugin_store::Builder::default().build()) .run(tauri::generate_context!()) .expect("error while running tauri application"); }