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

Method deleteView

src/services/ViewStateManager.ts:290–299  ·  view source on GitHub ↗

* Delete a saved view

(viewId: string)

Source from the content-addressed store, hash-verified

288 * Delete a saved view
289 */
290 deleteView(viewId: string): void {
291 const viewIndex = this.savedViews.findIndex((v) => v.id === viewId);
292 if (viewIndex === -1) {
293 throw new Error(`Saved view with ID ${viewId} not found`);
294 }
295
296 this.savedViews.splice(viewIndex, 1);
297 void this.saveSavedViewsToPluginData();
298 this.emit("saved-views-changed", this.getSavedViews());
299 }
300
301 /**
302 * Get a saved view by ID

Callers

nothing calls this directly

Calls 3

getSavedViewsMethod · 0.95
emitMethod · 0.80

Tested by

no test coverage detected