Skip to content

Commit d6e69b2

Browse files
committed
Initialize window visibility
1 parent 79da928 commit d6e69b2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,12 @@ private async void OnLoaded(object sender, RoutedEventArgs e)
135135
if (_settings.HideOnStartup)
136136
{
137137
_viewModel.Hide();
138+
_viewModel.InitializeVisibilityStatus(false);
138139
}
139140
else
140141
{
141142
_viewModel.Show();
143+
_viewModel.InitializeVisibilityStatus(true);
142144
}
143145

144146
// Show notify icon when flowlauncher is hidden

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,12 @@ public bool ShouldIgnoreHotkeys()
15841584
public bool IsQuickSwitch { get; private set; }
15851585
public nint DialogWindowHandle { get; private set; } = nint.Zero;
15861586

1587-
private bool PreviousMainWindowVisibilityStatus { get; set; } = true;
1587+
private bool PreviousMainWindowVisibilityStatus { get; set; }
1588+
1589+
public void InitializeVisibilityStatus(bool visibilityStatus)
1590+
{
1591+
PreviousMainWindowVisibilityStatus = visibilityStatus;
1592+
}
15881593

15891594
#pragma warning disable VSTHRD100 // Avoid async void methods
15901595

0 commit comments

Comments
 (0)