Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix duplicate status bar icons (again) #141
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Young (TFS) committed May 4, 2017
1 parent c20bd63 commit 104ddc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/extensionmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,10 @@ export class ExtensionManager implements Disposable {
this._feedbackStatusBarItem.dispose();
this._feedbackStatusBarItem = undefined;
}
//No matter if we're signing out or re-initializing, we need the team extension's
//status bars and timers to be disposed but not the entire object
this._teamExtension.cleanup();

//If we are signing out, we need to keep some of the objects around
if (!preserveTeamExtension && this._teamExtension) {
this._teamExtension.dispose();
Expand Down
6 changes: 5 additions & 1 deletion src/team-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ export class TeamExtension {
this.refreshPollingItems();
}

dispose() {
public cleanup(): void {
if (this._pollingTimer) {
if (this._initialTimer) {
clearTimeout(this._initialTimer);
Expand All @@ -424,4 +424,8 @@ export class TeamExtension {
this._pinnedQueryStatusBarItem = undefined;
}
}

dispose() {
this.cleanup();
}
}

0 comments on commit 104ddc7

Please sign in to comment.