Skip to content

Commit d0846df

Browse files
committed
refactor: move first_run code to same function
1 parent 148e745 commit d0846df

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src-tauri/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,12 @@ pub fn handle_first_run() {
116116
app.notification()
117117
.builder()
118118
.title("Aw-Tauri")
119-
.body("Aw-Tauri is running in the background")
119+
.body("Welcome to Aw-Tauri! Click on the tray icon to launch the dashboard")
120120
.show()
121121
.unwrap();
122+
if let Some(window) = app.webview_windows().get("main") {
123+
window.show().unwrap();
124+
}
122125
});
123126
}
124127
}
@@ -495,10 +498,7 @@ pub fn run() {
495498
state.handle_system_click(&event.id().0);
496499
}
497500
});
498-
if user_config.defaults.autostart
499-
&& !user_config.defaults.autostart_minimized
500-
&& !*is_first_run()
501-
{
501+
if user_config.defaults.autostart && !user_config.defaults.autostart_minimized {
502502
if let Some(window) = app.webview_windows().get("main") {
503503
window.show().unwrap();
504504
}

0 commit comments

Comments
 (0)