Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit f166cfd

Browse files
committed
fix: uncolored statusbar
In the case of opening code and then afterwards change to workspace folder without reload of vscode, it is possibel to have colors slip through the disabled status. Now we are resetting the colors to undefined if disabled. Closes #301
1 parent a5b18cb commit f166cfd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/status-bar-manager.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export class StatusBarManager {
104104
this.statusBar.text = `${githubPullRequestIcon} ...`;
105105
if (this.colored) {
106106
this.statusBar.color = colors.none;
107+
} else {
108+
this.statusBar.color = undefined;
107109
}
108110
this.context.subscriptions.push(this.statusBar);
109111

@@ -177,6 +179,8 @@ export class StatusBarManager {
177179
this.statusBar.show();
178180
if (this.colored) {
179181
this.statusBar.color = colors.none;
182+
} else {
183+
this.statusBar.color = undefined;
180184
}
181185
this.statusBar.text = `${githubPullRequestIcon}`;
182186
if (!this.customStatusBarCommand) {
@@ -211,6 +215,8 @@ export class StatusBarManager {
211215
const status = await this.calculateMergableStatus(pullRequest);
212216
if (this.colored) {
213217
this.statusBar.color = colors[status];
218+
} else {
219+
this.statusBar.color = undefined;
214220
}
215221
this.statusBar.text = this.getPullRequestStautsText(pullRequest, status);
216222
if (!this.customStatusBarCommand) {
@@ -247,6 +253,8 @@ export class StatusBarManager {
247253
private showCreatePullRequestStatus(): void {
248254
if (this.colored) {
249255
this.statusBar.color = colors.none;
256+
} else {
257+
this.statusBar.color = undefined;
250258
}
251259
this.statusBar.text = `${githubPullRequestIcon} Create PR`;
252260
if (!this.customStatusBarCommand) {

0 commit comments

Comments
 (0)