ios fixes

This commit is contained in:
Gabriel Bazán 2016-10-08 21:12:30 -03:00
commit b29fab9ae2
3 changed files with 4 additions and 16 deletions

View file

@ -9,12 +9,12 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
var isCordova = platformInfo.isCordova;
var isIOS = platformInfo.isIOS;
$scope.appName = $window.appConfig.nameCase;
$scope.PNEnabledByUser = true;
$scope.isIOSApp = isIOS && isCordova;
if ($scope.isIOSApp) {
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled;
$scope.$digest();
PushNotification.hasPermission(function(data) {
$scope.PNEnabledByUser = data.isEnabled;
});
}
@ -23,14 +23,6 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
};
};
$scope.openSettings = function() {
cordova.plugins.diagnostic.switchToSettings(function() {
$log.debug('switched to settings');
}, function(err) {
$log.debug(err);
});
};
$scope.pushNotificationsChange = function() {
var opts = {
pushNotifications: {