mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Delay window show until plugins are initialized
- MainWindowVisibility starts as false (window hidden) - Window IsVisible bound to MainWindowVisibility - Set MainWindowVisibility = true in OnPluginsReady() after plugins load
This commit is contained in:
parent
5d80816f84
commit
c68a03e193
2 changed files with 5 additions and 3 deletions
|
|
@ -24,7 +24,8 @@
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
ExtendClientAreaToDecorationsHint="True"
|
ExtendClientAreaToDecorationsHint="True"
|
||||||
ExtendClientAreaChromeHints="NoChrome"
|
ExtendClientAreaChromeHints="NoChrome"
|
||||||
SizeToContent="Height">
|
SizeToContent="Height"
|
||||||
|
IsVisible="{Binding MainWindowVisibility, Mode=TwoWay}">
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<converters:BoolToIsVisibleConverter x:Key="BoolToVisibilityConverter" />
|
<converters:BoolToIsVisibleConverter x:Key="BoolToVisibilityConverter" />
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public partial class MainViewModel : ObservableObject
|
||||||
public event Action? ShowRequested;
|
public event Action? ShowRequested;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool _mainWindowVisibility = true;
|
private bool _mainWindowVisibility = false;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string _queryText = string.Empty;
|
private string _queryText = string.Empty;
|
||||||
|
|
@ -96,7 +96,8 @@ public partial class MainViewModel : ObservableObject
|
||||||
public void OnPluginsReady()
|
public void OnPluginsReady()
|
||||||
{
|
{
|
||||||
_pluginsReady = true;
|
_pluginsReady = true;
|
||||||
Log.Info(ClassName, "Plugins ready");
|
MainWindowVisibility = true;
|
||||||
|
Log.Info(ClassName, "Plugins ready - window shown");
|
||||||
if (!string.IsNullOrWhiteSpace(QueryText))
|
if (!string.IsNullOrWhiteSpace(QueryText))
|
||||||
_ = QueryAsync();
|
_ = QueryAsync();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue