Improve code quality

This commit is contained in:
Jack251970 2025-03-16 15:11:28 +08:00
parent 7c23aeb6d1
commit 07c5fa4f5f
2 changed files with 2 additions and 9 deletions

View file

@ -187,10 +187,8 @@ namespace Flow.Launcher
private void OnLoaded(object sender, RoutedEventArgs _)
{
Dispatcher.BeginInvoke((Action)(() =>
{
ThemeManager.Instance.RefreshFrame();
}), DispatcherPriority.Background);
// Refresh frame
ThemeManager.Instance.RefreshFrame();
// MouseEventHandler
PreviewMouseMove += MainPreviewMouseMove;

View file

@ -143,7 +143,6 @@ namespace Flow.Launcher.ViewModel
_userSelectedRecord = _userSelectedRecordStorage.Load();
_topMostRecord = _topMostRecordStorage.Load();
ContextMenu = new ResultsViewModel(Settings)
{
LeftClickResultCommand = OpenResultCommand,
@ -791,7 +790,6 @@ namespace Flow.Launcher.ViewModel
public string CycleHistoryUpHotkey => VerifyOrSetDefaultHotkey(Settings.CycleHistoryUpHotkey, "Alt+Up");
public string CycleHistoryDownHotkey => VerifyOrSetDefaultHotkey(Settings.CycleHistoryDownHotkey, "Alt+Down");
public string Image => Constant.QueryTextBoxIconImagePath;
public bool StartWithEnglishMode => Settings.AlwaysStartEn;
@ -1407,7 +1405,6 @@ namespace Flow.Launcher.ViewModel
});
}
public async void Hide()
{
lastHistoryIndex = 1;
@ -1483,8 +1480,6 @@ namespace Flow.Launcher.ViewModel
VisibilityChanged?.Invoke(this, new VisibilityChangedEventArgs { IsVisible = false });
}
/// <summary>
/// Checks if Flow Launcher should ignore any hotkeys
/// </summary>