()
| 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) { |
nothing calls this directly
no test coverage detected