mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Delay Hotkey register & use safe way calling mainwindow animation
This commit is contained in:
parent
df97be78a9
commit
739bf2036e
2 changed files with 4 additions and 3 deletions
|
|
@ -69,7 +69,6 @@ namespace Flow.Launcher
|
|||
PluginManager.LoadPlugins(_settings.PluginSettings);
|
||||
_mainVM = new MainViewModel(_settings);
|
||||
|
||||
HotKeyMapper.Initialize(_mainVM);
|
||||
|
||||
API = new PublicAPIInstance(_settingsVM, _mainVM, _alphabet);
|
||||
|
||||
|
|
@ -79,6 +78,8 @@ namespace Flow.Launcher
|
|||
await PluginManager.InitializePlugins(API);
|
||||
var window = new MainWindow(_settings, _mainVM);
|
||||
|
||||
HotKeyMapper.Initialize(_mainVM);
|
||||
|
||||
Log.Info($"|App.OnStartup|Dependencies Info:{ErrorReporting.DependenciesInfo()}");
|
||||
|
||||
Current.MainWindow = window;
|
||||
|
|
|
|||
|
|
@ -736,7 +736,7 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
if (_settings.UseSound)
|
||||
{
|
||||
MediaPlayer media = new MediaPlayer();
|
||||
var media = new MediaPlayer();
|
||||
media.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
|
||||
media.Play();
|
||||
}
|
||||
|
|
@ -746,7 +746,7 @@ namespace Flow.Launcher.ViewModel
|
|||
MainWindowVisibilityStatus = true;
|
||||
|
||||
if(_settings.UseAnimation)
|
||||
((MainWindow)Application.Current.MainWindow).WindowAnimator();
|
||||
((MainWindow)Application.Current.MainWindow)?.WindowAnimator();
|
||||
|
||||
MainWindowOpacity = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue