Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Jan 26, 2024
1 parent f7a0dc4 commit 478a4de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extension/src/ui/notification-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
// Fetch notifications
const notifications = await this.#fetchNotifications()

// Display all valid notifications
notifications
.filter(this.#notificationFilter.bind(this))
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -95,4 +95,4 @@ export class NotificationProvider {
const dismissedNotifications = this.#storageProvider.get('dismissedNotifications', [])
return dismissedNotifications.includes(notification.id)
}
}
}

0 comments on commit 478a4de

Please sign in to comment.