* Update the status bar display
()
| 103 | * Update the status bar display |
| 104 | */ |
| 105 | private async updateStatusBar(): Promise<void> { |
| 106 | if (!this.statusBarElement) { |
| 107 | this.stopElapsedTicker(); |
| 108 | return; |
| 109 | } |
| 110 | |
| 111 | if (!this.plugin.settings.showTrackedTasksInStatusBar) { |
| 112 | this.hide(); |
| 113 | return; |
| 114 | } |
| 115 | |
| 116 | try { |
| 117 | // Use request deduplicator to prevent excessive updates |
| 118 | const trackedTasks = await this.requestDeduplicator.execute("update-status-bar", () => |
| 119 | this.getTrackedTasks() |
| 120 | ); |
| 121 | |
| 122 | this.renderStatusBar(trackedTasks); |
| 123 | } catch (error) { |
| 124 | tasknotesLogger.error("Error updating status bar:", { |
| 125 | category: "internal", |
| 126 | operation: "updating-status-bar", |
| 127 | error: error, |
| 128 | }); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | private updatePomodoroStatusBar(): void { |
| 133 | if (!this.plugin.settings.showPomodoroInStatusBar) { |
no test coverage detected