diff --git a/extension/src/ui/notification-provider.ts b/extension/src/ui/notification-provider.ts index cc33dc77..52be8e48 100644 --- a/extension/src/ui/notification-provider.ts +++ b/extension/src/ui/notification-provider.ts @@ -19,20 +19,20 @@ export interface Notification { export class NotificationProvider { #storageProvider: StorageProvider - constructor( + constructor ( storageProvider: StorageProvider ) { this.#storageProvider = storageProvider } - activate () { + activate (): void { void this.#fetchAndDisplayNotifications() } async #fetchAndDisplayNotifications (): Promise { // Fetch notifications const notifications = await this.#fetchNotifications() - + // Display all valid notifications notifications .filter(this.#notificationFilter.bind(this)) @@ -60,7 +60,7 @@ export class NotificationProvider { }] } buttons = buttons?.concat(notification.buttons?.map(transformButton) ?? []) - + if (notification.type === 'error') { promptUserErrorMessage(notification.text, buttons) } else if (notification.type === 'info') { @@ -95,4 +95,4 @@ export class NotificationProvider { const dismissedNotifications = this.#storageProvider.get('dismissedNotifications', []) return dismissedNotifications.includes(notification.id) } -} \ No newline at end of file +}