mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
add small timeout before asking for notification permission
This commit is contained in:
parent
f6c765b7b5
commit
60f7a1dbd9
1 changed files with 3 additions and 1 deletions
|
|
@ -26,7 +26,9 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
|
|||
checkForNotifications();
|
||||
if ($state.is('options.social.party')) {
|
||||
if ('Notification' in window && window.Notification.permission === 'default') {
|
||||
window.Notification.requestPermission();
|
||||
setTimeout(function () {
|
||||
window.Notification.requestPermission();
|
||||
}, 100);
|
||||
}
|
||||
Chat.markChatSeen($scope.group._id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue