mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
add small timeout before asking for notification permission
This commit is contained in:
@@ -26,7 +26,9 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
|
|||||||
checkForNotifications();
|
checkForNotifications();
|
||||||
if ($state.is('options.social.party')) {
|
if ($state.is('options.social.party')) {
|
||||||
if ('Notification' in window && window.Notification.permission === 'default') {
|
if ('Notification' in window && window.Notification.permission === 'default') {
|
||||||
window.Notification.requestPermission();
|
setTimeout(function () {
|
||||||
|
window.Notification.requestPermission();
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
Chat.markChatSeen($scope.group._id);
|
Chat.markChatSeen($scope.group._id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user