Skip to content

Commit

Permalink
Simplify visibility check for PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Dec 1, 2024
1 parent 4af5291 commit 2734f8b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/model/notifications/nativeNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ export function makeNotification ({ title, body, icon, path }: {
// If this is a PWA that's not open, display a notification
// However, if it's not a PWA that's open, we don't use native notifications
if (
clientList.length !== 1 ||
self.location.query !== '?standalone=1' ||
clientList[0].visibilityState !== 'hidden' ||
clientList[0].focused
clientList.some(client => client.focused)
) {
return
}
Expand Down

0 comments on commit 2734f8b

Please sign in to comment.