Skip to content

Commit

Permalink
fix Notification compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Totto16 committed Apr 19, 2024
1 parent 5fb7c42 commit b19238a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export function newMessageTraySource(title: string, iconName: string): MessageTr
}

export function addNotification(source: MessageTraySource, notification: Notification): void {
if (isGnome45()) {
// @ts-expect-error gnome 45 type
if ((source as any as { showNotification: undefined | any }).showNotification !== undefined) {
// @ts-expect-error gnome 45 type, can also be in some earlier versions of gnome 46, so using an explicit check for undefined, so that it works everywhere
source.showNotification(notification);
} else {
(source as MessageTraySource).addNotification(notification as Notification);
Expand Down

0 comments on commit b19238a

Please sign in to comment.