-
-
Notifications
You must be signed in to change notification settings - Fork 455
Fix flow's hotkey not working correctly after changing in settings #565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
No problem I get the idea of this fix. |
Flow.Launcher/Helper/HotKeyMapper.cs
Outdated
| if (ShouldIgnoreHotkeys()) return; | ||
| mainViewModel.MainWindowVisibility = Visibility.Visible; | ||
| mainViewModel.ChangeQueryText(hotkey.ActionKeyword); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add mainViewModel.LastQuerySelected = false; to here because I do have encountered it is selected sometime.
That doesn't fix the issue. I will handle that once you have finished all the change you want. It will only happen when the current query text is the same as the expected plugin keyword text, which won't trigger the onTextChanged event.
|
Will do those changes tomorrow, haven't got around to finishing this at all this weekend. |
|
By the way, do you think it would be better to change the use of the property |
how is it confusing? i use it all the time, it makes sure the previous query is highlighted so i can start typing after triggered the window. |
|
@taooceros ready to go, please review 😄 |
It is confusing because when we don't want to select last query, we need to mark it as |
taooceros
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we shall change the select query property?
| catch | ||
| { | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant remove it, catch is needed to go to return false at the bottom, you can just use catch but you duplicate code for no benefit, so may be just leave it?
Flow.Launcher/HotkeyControl.xaml.cs
Outdated
| if (handler != null) | ||
| handler(this, EventArgs.Empty); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this way handler?.Invoke(this, EventArgs.Empty), but either is fine.
Flow.Launcher/Languages/en.xaml
Outdated
| <system:String x:Key="enable">Enable</system:String> | ||
| <system:String x:Key="disable">Disable</system:String> | ||
| <system:String x:Key="actionKeywords">Action keyword:</system:String> | ||
| <system:String x:Key="actionKeywords">Query</system:String> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, i didnt realise that is hooked up to Action keyword field
oh ok, you mean the code not the actual functionality |
|
@taooceros just done refactor based on my understanding of how the last query modes should work, have a look and let me know if it's correct #568 |
|
@taooceros i think this pr is ready to go, let's get this in and do the last query mode refactor seperately so we can release 1.8.0 since there is no functionality change for the refactor |
Oh sorry, I was not at home these few days so haven't got through the whole pr again. |
All good no stress, I was just doing a fyi |

Description
After changing the hotkey that triggers flow's query window, the query window that get triggered by new hotkey can not be used- unable to move up and down on the result list, unable to move the cursor on the query test box, the query text is not select if you have this option enabled, and query window's position is not in the same place as previous.
Changes
How to reproduce
Change hotkey. Trigger the query window, then unable to use it with the issues described above.
Tested with this PR:
Close #166