Skip to content
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

Replace Disposable[] with DisposableStore #80447

Merged
merged 4 commits into from
Sep 9, 2019
Merged

Replace Disposable[] with DisposableStore #80447

merged 4 commits into from
Sep 9, 2019

Conversation

solomatov
Copy link
Contributor

See #74250 for details.

@solomatov
Copy link
Contributor Author

If it's ok, I can do more of it. There aren't that many usages of Disposable[] as a DisposableStore.

@solomatov
Copy link
Contributor Author

And what do you think about more of such contributions? I want to learn the codebase, and such changes are a good way to learn about it.

@@ -214,7 +214,7 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
this.renderers.set(renderer.templateId, renderer);
}

this.cache = new RowCache(this.renderers);
this.cache = this.disposables.add(new RowCache(this.renderers));
Copy link
Collaborator

@mjbvz mjbvz Sep 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to call this.disposables.clear() before adding the new entries. This resets the store (which is what the re-assignment previously was simulating)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually never mind. I see this is in the constructor so it's not required

@mjbvz mjbvz added this to the September 2019 milestone Sep 9, 2019
@mjbvz mjbvz merged commit d163340 into microsoft:master Sep 9, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Sep 9, 2019

Thanks. We would take other PRs like this. Please just keep each PR small and isolated so they are easy to review

@solomatov solomatov deleted the first-pr-vscode branch September 12, 2019 01:30
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants