mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[PTRun] Fix always show after executing context menu result (#21291)
* fix always show * add tests * remove workaround
This commit is contained in:
committed by
GitHub
parent
a3042b8435
commit
460f242967
@@ -65,7 +65,7 @@ namespace PowerLauncher.ViewModel
|
||||
|
||||
public const int NoSelectionIndex = -1;
|
||||
|
||||
public ResultViewModel(Result result)
|
||||
public ResultViewModel(Result result, IMainViewModel mainViewModel)
|
||||
{
|
||||
if (result != null)
|
||||
{
|
||||
@@ -77,6 +77,7 @@ namespace PowerLauncher.ViewModel
|
||||
|
||||
ActivateContextButtonsHoverCommand = new RelayCommand(ActivateContextButtonsHoverAction);
|
||||
DeactivateContextButtonsHoverCommand = new RelayCommand(DeactivateContextButtonsHoverAction);
|
||||
MainViewModel = mainViewModel;
|
||||
}
|
||||
|
||||
private void ActivateContextButtonsHoverAction(object sender)
|
||||
@@ -159,8 +160,7 @@ namespace PowerLauncher.ViewModel
|
||||
|
||||
if (hideWindow)
|
||||
{
|
||||
// TODO - Do we hide the window
|
||||
// MainWindowVisibility = Visibility.Collapsed;
|
||||
MainViewModel.Hide();
|
||||
}
|
||||
})));
|
||||
}
|
||||
@@ -258,6 +258,8 @@ namespace PowerLauncher.ViewModel
|
||||
|
||||
public Result Result { get; }
|
||||
|
||||
public IMainViewModel MainViewModel { get; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
var r = obj as ResultViewModel;
|
||||
|
||||
Reference in New Issue
Block a user