mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-05 04:39:08 +08:00
Codeflow cleanup when selectedItem is not null
This commit is contained in:
parent
d0822ab1fe
commit
92daf156f5
@ -155,11 +155,11 @@ namespace Wox.ViewModel
|
||||
if(results.SelectedItem != null)
|
||||
{
|
||||
//If there is a context button selected fire the action for that button before the main command.
|
||||
bool didExecuteContextButton = results.SelectedItem?.ExecuteSelectedContextButton() ?? false;
|
||||
bool didExecuteContextButton = results.SelectedItem.ExecuteSelectedContextButton();
|
||||
|
||||
if (!didExecuteContextButton)
|
||||
{
|
||||
var result = results.SelectedItem?.Result;
|
||||
var result = results.SelectedItem.Result;
|
||||
if (result != null) // SelectedItem returns null if selection is empty.
|
||||
{
|
||||
bool hideWindow = result.Action != null && result.Action(new ActionContext
|
||||
|
Loading…
Reference in New Issue
Block a user