(app: &AppHandle)
| 271 | |
| 272 | #[tracing::instrument(level = "debug", skip(app))] |
| 273 | pub fn handle_window_close(app: &AppHandle) -> Result<bool> { |
| 274 | let preferences: State<PreferenceConfig> = app.state(); |
| 275 | let preferences: CheckboxPreference = |
| 276 | preferences.load_selective_array("system_settings.minimize_to_tray".into())?; |
| 277 | if preferences.enabled { |
| 278 | return Ok(false); |
| 279 | } |
| 280 | |
| 281 | Ok(true) |
| 282 | } |
| 283 | |
| 284 | #[tracing::instrument(level = "debug", skip(app))] |
| 285 | pub fn build_tray_menu(app: &App) -> Result<()> { |
no test coverage detected