Fix set label command on history items#710
Merged
aeisenberg merged 2 commits intogithub:mainfrom Dec 16, 2020
Merged
Conversation
ef8f1e9 to
4462cf0
Compare
Contributor
Author
|
Converting to draft since I want to add a few unit tests. |
Contributor
adityasharad
left a comment
There was a problem hiding this comment.
Looks very reasonable. I'll wait for tests :)
|
|
||
| refresh() { | ||
| this._onDidChangeTreeData.fire(undefined); | ||
| refresh(CompletedQuery?: CompletedQuery) { |
Contributor
There was a problem hiding this comment.
Lowercase the variable to distinguish them.
36d76d2 to
1ece1bb
Compare
adityasharad
approved these changes
Dec 16, 2020
This removes the cached treeItem that is a property of the completedQuery. We should not be caching them since they are cached by the vscode api itself. Instead, we should recreate whenever requested. Also, this change fixes github#598 in a new way. Instead of adding the context to the cached treeItem, we simply refresh only the item that has changed. This is a fast operation.
1ece1bb to
081d5bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the cached treeItem that is a property of the
completedQuery. We should not be caching them since they are cached by
the vscode api itself. Instead, we should recreate whenever requested.
Also, this change fixes #598 in a new way. Instead of adding the
context to the cached treeItem, we simply refresh only the item that has
changed. This is a fast operation.
Fixes #709.
Checklist
@github/docs-content-dsphas been cc'd in all issues for UI or other user-facing changes made by this pull request.