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

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

* change file [skip ci]
This commit is contained in:
Lucas Fernandes Nogueira 2021-07-28 15:13:30 -03:00 committed by GitHub
parent 05e679a6d2
commit 1792c45592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

5
.changes/setup-fix.md Normal file
View File

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

View File

@ -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);