Fixed a bug with keyboard shortcuts crushing the app. (#607)
This commit is contained in:
1 parent
122dfccc00
commit
8593b5ac5f
1 file changed
+8
-5
@@ -541,16 +541,19 @@ namespace FluentTerminal.App.ViewModels
|
||||
}
|
||||
case nameof(Command.Search):
|
||||
{
|
||||
ShowSearchPanel = !ShowSearchPanel;
|
||||
if (ShowSearchPanel)
|
||||
await ApplicationView.ExecuteOnUiThreadAsync(() =>
|
||||
{
|
||||
SearchStarted?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
ShowSearchPanel = !ShowSearchPanel;
|
||||
if (ShowSearchPanel)
|
||||
{
|
||||
SearchStarted?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
_keyboardCommandService.SendCommand(e);
|
||||
await ApplicationView.ExecuteOnUiThreadAsync(() => _keyboardCommandService.SendCommand(e));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user