-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
When code runner extension gets installed, disable the play button icon immediately #7616
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7616 +/- ##
==========================================
- Coverage 58.68% 58.35% -0.33%
==========================================
Files 493 493
Lines 21990 21989 -1
Branches 3531 3525 -6
==========================================
- Hits 12905 12832 -73
- Misses 8279 8351 +72
Partials 806 806
Continue to review full report at Codecov.
|
const isInstalled = this.isCodeRunnerInstalled(); | ||
// Hide the play icon if code runner is installed, otherwise display the play icon. | ||
this.commands.executeCommand('setContext', 'python.showPlayIcon', !isInstalled) | ||
.then(noop, noop); |
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.
For my info. Why not await
here?
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.
executeCommand
returns a thenable type object (by design), not a promise.
So although it's an async operation, we can't use await.
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'd say we can wait, but there's no need to wait. I.e. no point delaying other code when we don't care how long it takes to complete.
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.
Wait, I just noticed we can do that, not sure why I didn't use it in the first place.
For #7613