Skip to content

Commit

Permalink
Merge pull request #17493 from tienifr/fix/17242-no-notification-on-w…
Browse files Browse the repository at this point in the history
…eb-if-window-is-not-active

Fix: No notification on web if window is not active
  • Loading branch information
luacmartins authored Apr 19, 2023
2 parents 7a65311 + 7229c81 commit 1100127
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/Visibility/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {AppState} from 'react-native';
* @returns {Boolean}
*/
function isVisible() {
return document.visibilityState === 'visible';
return document.visibilityState === 'visible' && document.hasFocus();
}

/**
Expand Down

0 comments on commit 1100127

Please sign in to comment.