Skip to content

Commit c604df9

Browse files
authored
Merge pull request #3862 from Flow-Launcher/dialog_jump_improvement
Fix dialog jump issue when result will not be execueted under empty query option
2 parents 1da7e1e + 20f6a74 commit c604df9

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -501,15 +501,14 @@ private async Task OpenResultAsync(string index)
501501
// For Dialog Jump and left click mode, we need to navigate to the path
502502
if (_isDialogJump && Settings.DialogJumpResultBehaviour == DialogJumpResultBehaviours.LeftClick)
503503
{
504-
Hide();
505-
506-
if (SelectedResults.SelectedItem != null && DialogWindowHandle != nint.Zero)
504+
if (result is DialogJumpResult dialogJumpResult)
507505
{
508-
if (result is DialogJumpResult dialogJumpResult)
509-
{
510-
Win32Helper.SetForegroundWindow(DialogWindowHandle);
511-
_ = Task.Run(() => DialogJump.JumpToPathAsync(DialogWindowHandle, dialogJumpResult.DialogJumpPath));
512-
}
506+
Win32Helper.SetForegroundWindow(DialogWindowHandle);
507+
_ = Task.Run(() => DialogJump.JumpToPathAsync(DialogWindowHandle, dialogJumpResult.DialogJumpPath));
508+
}
509+
else
510+
{
511+
App.API.LogError(ClassName, "DialogJumpResult expected but got a different result type.");
513512
}
514513
}
515514
// For query mode, we execute the result

0 commit comments

Comments
 (0)