Forráskód Böngészése

fix(core): run setup after preparing system tray (#2312)

* fix(core): run setup after preparing system tray

* change file [skip ci]
Lucas Fernandes Nogueira 4 éve
szülő
commit
1792c45592
2 módosított fájl, 7 hozzáadás és 2 törlés
  1. 5 0
      .changes/setup-fix.md
  2. 2 2
      core/tauri/src/app.rs

+ 5 - 0
.changes/setup-fix.md

@@ -0,0 +1,5 @@
+---
+"tauri": patch
+---
+
+Run the setup callback after preparing the system tray.

+ 2 - 2
core/tauri/src/app.rs

@@ -822,8 +822,6 @@ impl<R: Runtime> Builder<R> {
       }
     }
 
-    (self.setup)(&mut app).map_err(|e| crate::Error::Setup(e))?;
-
     #[cfg(feature = "system-tray")]
     if let Some(system_tray) = self.system_tray {
       let mut ids = HashMap::new();
@@ -894,6 +892,8 @@ impl<R: Runtime> Builder<R> {
       }
     }
 
+    (self.setup)(&mut app).map_err(|e| crate::Error::Setup(e))?;
+
     #[cfg(feature = "updater")]
     app.run_updater(main_window);