2020using Flow . Launcher . Infrastructure . Hotkey ;
2121using Flow . Launcher . Infrastructure . Image ;
2222using Flow . Launcher . Infrastructure . UserSettings ;
23+ using Flow . Launcher . Plugin ;
2324using Flow . Launcher . Plugin . SharedCommands ;
2425using Flow . Launcher . ViewModel ;
2526using Microsoft . Win32 ;
@@ -91,8 +92,8 @@ public MainWindow()
9192
9293 InitSoundEffects ( ) ;
9394 DataObject . AddPastingHandler ( QueryTextBox , QueryTextBox_OnPaste ) ;
94- ModernWpf . ThemeManager . Current . ActualApplicationThemeChanged += ThemeManager_ActualApplicationThemeChanged ;
9595 SystemEvents . PowerModeChanged += SystemEvents_PowerModeChanged ;
96+ _viewModel . ActualApplicationThemeChanged += ViewModel_ActualApplicationThemeChanged ;
9697 }
9798
9899 #endregion
@@ -101,7 +102,7 @@ public MainWindow()
101102
102103#pragma warning disable VSTHRD100 // Avoid async void methods
103104
104- private void ThemeManager_ActualApplicationThemeChanged ( ModernWpf . ThemeManager sender , object args )
105+ private void ViewModel_ActualApplicationThemeChanged ( object sender , ActualApplicationThemeChangedEventArgs args )
105106 {
106107 _ = _theme . RefreshFrameAsync ( ) ;
107108 }
@@ -1351,7 +1352,7 @@ protected virtual void Dispose(bool disposing)
13511352 _notifyIcon ? . Dispose ( ) ;
13521353 animationSoundWMP ? . Close ( ) ;
13531354 animationSoundWPF ? . Dispose ( ) ;
1354- ModernWpf . ThemeManager . Current . ActualApplicationThemeChanged -= ThemeManager_ActualApplicationThemeChanged ;
1355+ _viewModel . ActualApplicationThemeChanged -= ViewModel_ActualApplicationThemeChanged ;
13551356 SystemEvents . PowerModeChanged -= SystemEvents_PowerModeChanged ;
13561357 }
13571358
0 commit comments