MCPcopy
hub / github.com/callumalpass/tasknotes / updateStatusBar

Method updateStatusBar

src/ui/StatusBarService.ts:105–130  ·  view source on GitHub ↗

* Update the status bar display

()

Source from the content-addressed store, hash-verified

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) {

Calls 6

stopElapsedTickerMethod · 0.95
hideMethod · 0.95
getTrackedTasksMethod · 0.95
renderStatusBarMethod · 0.95
errorMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected