Skip to content

Commit ec966c1

Browse files
committed
Improve log message & legacy mode
1 parent 9b0cf6c commit ec966c1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Flow.Launcher.Infrastructure/QuickSwitch/Models/WindowsDialog.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public bool JumpFolder(string path, bool auto)
144144
{
145145
// https://github.com/idkidknow/Flow.Launcher.Plugin.DirQuickJump/issues/1
146146
// The dialog is a legacy one, so we can only edit file editor directly.
147+
Log.Debug(ClassName, "Legacy dialog, using legacy jump folder method");
147148
return JumpFolderWithFileEditor(path);
148149
}
149150

@@ -154,11 +155,17 @@ public bool JumpFolder(string path, bool auto)
154155
}, 1000);
155156
if (timeOut)
156157
{
157-
Log.Error(ClassName, "Path control is not visible");
158-
return false;
158+
// Path control is not visible, so we can only edit file editor directly.
159+
Log.Debug(ClassName, "Path control is not visible, using legacy jump folder method");
160+
return JumpFolderWithFileEditor(path);
159161
}
160162

161-
if (_pathEditor.IsNull) return false;
163+
if (_pathEditor.IsNull && !GetPathControlEditor())
164+
{
165+
// Path editor cannot be found, so we can only edit file editor directly.
166+
Log.Debug(ClassName, "Path editor cannot be found, using legacy jump folder method");
167+
return JumpFolderWithFileEditor(path);
168+
}
162169
SetWindowText(_pathEditor, path);
163170

164171
_inputSimulator.Keyboard.KeyPress(VirtualKeyCode.RETURN);

Flow.Launcher.Infrastructure/QuickSwitch/QuickSwitch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ private static void JumpToPath(IQuickSwitchDialogWindowTab dialog, string path,
607607
result = FileJump(path, dialog, openFile: true);
608608
break;
609609
case QuickSwitchFileResultBehaviours.Directory:
610-
Log.Debug(ClassName, $"File Jump Directory: {path}");
610+
Log.Debug(ClassName, $"File Jump Directory (Auto: {auto}): {path}");
611611
result = DirJump(Path.GetDirectoryName(path), dialog, auto);
612612
break;
613613
default:

0 commit comments

Comments
 (0)