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"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome"
|
||||
SizeToContent="Height">
|
||||
SizeToContent="Height"
|
||||
IsVisible="{Binding MainWindowVisibility, Mode=TwoWay}">
|
||||
|
||||
<Window.Resources>
|
||||
<converters:BoolToIsVisibleConverter x:Key="BoolToVisibilityConverter" />
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public partial class MainViewModel : ObservableObject
|
|||
public event Action? ShowRequested;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool _mainWindowVisibility = true;
|
||||
private bool _mainWindowVisibility = false;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _queryText = string.Empty;
|
||||
|
|
@ -96,7 +96,8 @@ public partial class MainViewModel : ObservableObject
|
|||
public void OnPluginsReady()
|
||||
{
|
||||
_pluginsReady = true;
|
||||
Log.Info(ClassName, "Plugins ready");
|
||||
MainWindowVisibility = true;
|
||||
Log.Info(ClassName, "Plugins ready - window shown");
|
||||
if (!string.IsNullOrWhiteSpace(QueryText))
|
||||
_ = QueryAsync();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue