From 4a37900d49b4fcdfa6dbd68c89604b96951d7b3a Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Thu, 14 Oct 2021 01:00:16 +0900 Subject: [PATCH] On Load Animation (WIP) --- Flow.Launcher/Helper/HotKeyMapper.cs | 4 ++-- Flow.Launcher/MainWindow.xaml | 16 ++++++++++++++++ Flow.Launcher/ViewModel/MainViewModel.cs | 3 +-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs index b9eee1a17..21f277b99 100644 --- a/Flow.Launcher/Helper/HotKeyMapper.cs +++ b/Flow.Launcher/Helper/HotKeyMapper.cs @@ -63,7 +63,7 @@ namespace Flow.Launcher.Helper mainViewModel.ToggleFlowLauncherOpacity(); var overlayTask = Task.Delay(30).ContinueWith(_ => { mainViewModel.ToggleFlowLauncher(); - }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()); + }); e.Handled = true; } } @@ -81,7 +81,7 @@ namespace Flow.Launcher.Helper switch(settings.LastQueryMode) { case LastQueryMode.Empty: - mainViewModel.ChangeQueryText(""); + mainViewModel.ChangeQueryText(string.Empty); break; case LastQueryMode.Preserved: mainViewModel.LastQuerySelected = true; diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 73b13be8c..d41e7419a 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -28,6 +28,22 @@ PreviewKeyDown="OnKeyDown" Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" d:DataContext="{d:DesignInstance vm:MainViewModel}"> + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 80378f018..d47c54022 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -14,7 +14,6 @@ using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; -using Flow.Launcher.Helper; using Flow.Launcher.Plugin.SharedCommands; using Flow.Launcher.Storage; using Flow.Launcher.Infrastructure.Logger; @@ -163,7 +162,7 @@ namespace Flow.Launcher.ViewModel var overlayTask = Task.Delay(30).ContinueWith(_ => { MainWindowVisibility = Visibility.Collapsed; - }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()); + }); }