From 20f6a74fbe299e6d2992e4cd58688198e43f6610 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 23 Jul 2025 17:33:03 +0800 Subject: [PATCH] Fix dialog jump issue when result will not be execueted under empty query option --- Flow.Launcher/ViewModel/MainViewModel.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 5eae23c2730..045ff46cc9e 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -501,15 +501,14 @@ private async Task OpenResultAsync(string index) // For Dialog Jump and left click mode, we need to navigate to the path if (_isDialogJump && Settings.DialogJumpResultBehaviour == DialogJumpResultBehaviours.LeftClick) { - Hide(); - - if (SelectedResults.SelectedItem != null && DialogWindowHandle != nint.Zero) + if (result is DialogJumpResult dialogJumpResult) { - if (result is DialogJumpResult dialogJumpResult) - { - Win32Helper.SetForegroundWindow(DialogWindowHandle); - _ = Task.Run(() => DialogJump.JumpToPathAsync(DialogWindowHandle, dialogJumpResult.DialogJumpPath)); - } + Win32Helper.SetForegroundWindow(DialogWindowHandle); + _ = Task.Run(() => DialogJump.JumpToPathAsync(DialogWindowHandle, dialogJumpResult.DialogJumpPath)); + } + else + { + App.API.LogError(ClassName, "DialogJumpResult expected but got a different result type."); } } // For query mode, we execute the result