* Show or hide the status bar based on settings
()
| 439 | * Show or hide the status bar based on settings |
| 440 | */ |
| 441 | updateVisibility(): void { |
| 442 | if (this.plugin.settings.showTrackedTasksInStatusBar) { |
| 443 | if (!this.statusBarElement) { |
| 444 | this.ensureTrackedStatusBarElement(); |
| 445 | } else { |
| 446 | void this.updateStatusBar(); |
| 447 | } |
| 448 | } else { |
| 449 | this.hide(); |
| 450 | } |
| 451 | |
| 452 | if (this.plugin.settings.showPomodoroInStatusBar) { |
| 453 | this.ensurePomodoroStatusBarElement(); |
| 454 | this.updatePomodoroStatusBar(); |
| 455 | } else { |
| 456 | this.hidePomodoroStatusBar(); |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | /** |
| 461 | * Hide the status bar |
no test coverage detected