MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / initialize

Method initialize

src/ui/NotificationService.ts:38–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 async initialize(): Promise<void> {
39 if (!this.plugin.settings.enableNotifications) {
40 return;
41 }
42
43 // Request notification permission if using system notifications
44 if (
45 this.plugin.settings.notificationType === "system" &&
46 typeof Notification !== "undefined"
47 ) {
48 if (Notification.permission === "default") {
49 await Notification.requestPermission();
50 }
51 }
52
53 // Set up task update listener to handle stale notifications
54 this.setupTaskUpdateListener();
55 this.setupFileUpdateListener();
56
57 // Start the two-tier interval system
58 this.startBroadScan();
59 this.startQuickCheck();
60
61 // Do an initial scan
62 await this.scanTasksAndBuildQueue();
63 }
64
65 destroy(): void {
66 if (this.broadScanInterval) {

Callers

nothing calls this directly

Calls 5

startBroadScanMethod · 0.95
startQuickCheckMethod · 0.95

Tested by

no test coverage detected