-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: Run task when double clicking tasks #1174
Conversation
Interesting. looks a promising way to mimic double click handler. But I see in the utils, you cached the date in a shared variable for all tree items, which might cause problem. |
you're right, in this way we should find a way to record the tree item as well. |
a treeItem has a unique id. consider use that? |
yes, but that's something like internal identifier and if we didn't specify it before, we will get undefined when accessing that id. Why not directly assert equal of two tree items? Actually, they are the same object if we just click an item twice. |
it's fine. |
if (treeItem && treeItem.task) { | ||
await runTask(this.rootProjectsStore, treeItem.task, this.client); | ||
if (checkDoubleClick()) { | ||
return run(treeItem, this.rootProjectsStore, this.client); |
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.
would better to clear the state if a double click is detected. Otherwise, triple click is regarded as two double clicks.
faf89c7
to
8288474
Compare
fix #1124
previously: double click task will open the corresponding build file
current: double click task will run this task