Skip to content

Commit

Permalink
fix(core): run setup after preparing system tray (#2312)
Browse files Browse the repository at this point in the history
* fix(core): run setup after preparing system tray

* change file [skip ci]
  • Loading branch information
lucasfernog committed Jul 28, 2021
1 parent 05e679a commit 1792c45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/setup-fix.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Run the setup callback after preparing the system tray.
4 changes: 2 additions & 2 deletions core/tauri/src/app.rs
Expand Up @@ -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();
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 1792c45

Please sign in to comment.