Fix the showing of stale View Properties
data
#785
Closed
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.
Fixes #330
After updates and refreshes, the View Properties data is often stale. It seems that although the view itself is showing the correct and updated data, the tree item that is passed into the View Properties command is often a stale one.
I looked but could not find what would be causing this to happen, however, there are some easy ways for me to help combat this in the ACA extension until we figure out a more robust solution. To combat this locally, I have made a global resource cache that all relevant tree items would have reference to. The idea is that if a stale item is passed to the view properties command, the item now has a link to a global reference from which it can pull the latest data, independent from the state of the current item. The cache is refreshed naturally with the latest data whenever we issue refresh commands because the setting is done whenever the tree items are first constructed / refreshed. This should theoretically always keep it in sync with the latest view.