fix: guide users through blocked notification permissions

This commit is contained in:
2026-09-06 14:41:24 +03:00
parent df0626a71f
commit 38227862c0
3 changed files with 47 additions and 10 deletions
+2 -2
View File
@@ -592,8 +592,8 @@ export const AppProvider = ({ children }) => {
};
const requestPushPermission = async () => {
if (!('Notification' in window)) return 'unsupported';
if (Notification.permission === 'granted') return 'granted';
try { return await Notification.requestPermission(); } catch { return 'denied'; }
if (Notification.permission !== 'default') return Notification.permission;
return await Notification.requestPermission();
};
const refreshNotifications=async()=>{
const session=getToken(),version=++notificationVersion.current;