mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Move "HideEmptyQuery" from toggleflow to hide.
This commit is contained in:
parent
fac8b76485
commit
58c599e748
1 changed files with 18 additions and 21 deletions
|
|
@ -704,33 +704,30 @@ namespace Flow.Launcher.ViewModel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (_settings.LastQueryMode)
|
Hide();
|
||||||
{
|
|
||||||
case LastQueryMode.Empty:
|
|
||||||
ChangeQueryText(string.Empty);
|
|
||||||
Application.Current.MainWindow.Opacity = 0; // Trick for no delay
|
|
||||||
await Task.Delay(100);
|
|
||||||
Application.Current.MainWindow.Opacity = 1;
|
|
||||||
break;
|
|
||||||
case LastQueryMode.Preserved:
|
|
||||||
LastQuerySelected = true;
|
|
||||||
break;
|
|
||||||
case LastQueryMode.Selected:
|
|
||||||
LastQuerySelected = false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>");
|
|
||||||
}
|
|
||||||
MainWindowVisibility = Visibility.Collapsed;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Hide()
|
public async void Hide()
|
||||||
{
|
{
|
||||||
if (MainWindowVisibility != Visibility.Collapsed)
|
switch (_settings.LastQueryMode)
|
||||||
{
|
{
|
||||||
ToggleFlowLauncher();
|
case LastQueryMode.Empty:
|
||||||
|
ChangeQueryText(string.Empty);
|
||||||
|
Application.Current.MainWindow.Opacity = 0; // Trick for no delay
|
||||||
|
await Task.Delay(100);
|
||||||
|
Application.Current.MainWindow.Opacity = 1;
|
||||||
|
break;
|
||||||
|
case LastQueryMode.Preserved:
|
||||||
|
LastQuerySelected = true;
|
||||||
|
break;
|
||||||
|
case LastQueryMode.Selected:
|
||||||
|
LastQuerySelected = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>");
|
||||||
}
|
}
|
||||||
|
MainWindowVisibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue