Skip to content

Commit 61a5fd1

Browse files
committed
Add CheckFirstLaucnh Setting
1 parent 25f71e8 commit 61a5fd1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public string Language
3939
public string ResultFontWeight { get; set; }
4040
public string ResultFontStretch { get; set; }
4141
public bool UseGlyphIcons { get; set; } = true;
42+
public bool FirstLaunch { get; set; } = true;
4243

4344
public int CustomExplorerIndex { get; set; } = 0;
4445

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ private void OnInitialized(object sender, EventArgs e)
6565

6666
private void OnLoaded(object sender, RoutedEventArgs _)
6767
{
68+
CheckFirstLaunch();
6869
HideStartup();
6970
// show notify icon when flowlauncher is hidden
7071
InitializeNotifyIcon();
@@ -239,6 +240,15 @@ private void InitializeNotifyIcon()
239240
};
240241
}
241242

243+
private void CheckFirstLaunch()
244+
{
245+
if (_settings.FirstLaunch)
246+
{
247+
_settings.FirstLaunch = false;
248+
_viewModel.Save();
249+
OpenWelcomeWindow();
250+
}
251+
}
242252
private void OpenWelcomeWindow()
243253
{
244254
Flow.Launcher.WelcomeWindow WelcomeWindow = new WelcomeWindow(_settings);

0 commit comments

Comments
 (0)