Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/vs/workbench/browser/parts/statusbar/statusbarItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export class StatusbarEntryItem extends Disposable {

class StatusBarCodiconLabel extends SimpleIconLabel {

private progressCodicon = renderIcon(syncing);
private progressCodicon: HTMLElement | undefined;

private currentText = '';
private currentShowProgress: boolean | 'loading' | 'syncing' = false;
Expand All @@ -300,7 +300,9 @@ class StatusBarCodiconLabel extends SimpleIconLabel {
set showProgress(showProgress: boolean | 'loading' | 'syncing') {
if (this.currentShowProgress !== showProgress) {
this.currentShowProgress = showProgress;
this.progressCodicon = renderIcon(showProgress === 'syncing' ? syncing : spinningLoading);
if (showProgress) {
this.progressCodicon = renderIcon(showProgress === 'syncing' ? syncing : spinningLoading);
}
this.text = this.currentText;
}
}
Expand All @@ -309,7 +311,7 @@ class StatusBarCodiconLabel extends SimpleIconLabel {

// Progress: insert progress codicon as first element as needed
// but keep it stable so that the animation does not reset
if (this.currentShowProgress) {
if (this.currentShowProgress && this.progressCodicon) {

// Append as needed
if (this.container.firstChild !== this.progressCodicon) {
Expand Down
Loading