diff options
| author | Pliable Pixels <pliablepixels@users.noreply.github.com> | 2020-08-29 10:20:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-29 10:20:04 -0400 |
| commit | 7953a77243231f65660787b22a8187fa2dc7bfbf (patch) | |
| tree | e7a0d7689195fcb813b31d22612a71eb9e44cd5c /www/js/EventCtrl.js | |
| parent | 53d63eb1445603975c556aa49d4b3f15a87867a8 (diff) | |
| parent | ca768975f2d0258e4e09acc896cee4dd1ee5b0ca (diff) | |
Merge pull request #964 from pliablepixels/dev
Dev
Diffstat (limited to 'www/js/EventCtrl.js')
| -rw-r--r-- | www/js/EventCtrl.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 40762f6b..a6e89d6c 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -2475,25 +2475,23 @@ angular.module('zmApp.controllers') $scope.popover = popover; }); + // coming to this view clears all notification badges EventServer.sendMessage('push', { type: 'badge', badge: 0, }); + // also clear bells + $rootScope.alarmCount = "0"; + $rootScope.isAlarm = 0; - - - //reset badge count - if (window.cordova && window.cordova.plugins.notification) { - $cordovaBadge.set(0).then(function () { - // You have permission, badge set. - }, function (err) { - NVR.debug("app does not have badge permissions. Please check your phone notification settings"); - // You do not have permission. - }); + // reset badge count + if (window.FirebasePlugin && $rootScope.platformOS == 'ios') { + NVR.debug ('Clearing app badge count'); + window.FirebasePlugin.setBadgeNumber(0); - $cordovaLocalNotification.clearAll(); } - + + }); $scope.$on('$ionicView.leave', function () { |
