Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Flow.Launcher/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
PluginManager.LoadPlugins(_settings.PluginSettings);
_mainVM = new MainViewModel(_settings);

HotKeyMapper.Initialize(_mainVM);

API = new PublicAPIInstance(_settingsVM, _mainVM, _alphabet);

Expand All @@ -79,10 +78,13 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
await PluginManager.InitializePlugins(API);
var window = new MainWindow(_settings, _mainVM);


Log.Info($"|App.OnStartup|Dependencies Info:{ErrorReporting.DependenciesInfo()}");

Current.MainWindow = window;
Current.MainWindow.Title = Constant.FlowLauncher;

HotKeyMapper.Initialize(_mainVM);

// happlebao todo temp fix for instance code logic
// load plugin before change language, because plugin language also needs be changed
Expand Down
4 changes: 2 additions & 2 deletions Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ public void Show()
{
if (_settings.UseSound)
{
MediaPlayer media = new MediaPlayer();
var media = new MediaPlayer();
media.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
media.Play();
}
Expand All @@ -746,7 +746,7 @@ public void Show()
MainWindowVisibilityStatus = true;

if(_settings.UseAnimation)
((MainWindow)Application.Current.MainWindow).WindowAnimator();
((MainWindow)Application.Current.MainWindow)?.WindowAnimator();

MainWindowOpacity = 1;
}
Expand Down