mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 16:58:47 +01:00
Clear badge when onmount too
This commit is contained in:
parent
d18db56032
commit
7a30cc4b12
1 changed files with 5 additions and 0 deletions
|
@ -106,6 +106,11 @@ export default memo(function NotificationService() {
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
if (navigator?.clearAppBadge) {
|
||||||
|
navigator.clearAppBadge();
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
usePageVisibility((visible) => {
|
usePageVisibility((visible) => {
|
||||||
if (visible && navigator?.clearAppBadge) {
|
if (visible && navigator?.clearAppBadge) {
|
||||||
console.log('🔰 Clear app badge');
|
console.log('🔰 Clear app badge');
|
||||||
|
|
Loading…
Reference in a new issue