Merge pull request #4035 from gabrielbazan7/fix/PNDisabled
If pn was not enabled by user, do not show pn switch in IOS
This commit is contained in:
commit
9357c9c1e3
3 changed files with 26 additions and 5 deletions
|
|
@ -14,12 +14,27 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
|
|||
this.feeOpts = feeService.feeOpts;
|
||||
this.currentFeeLevel = feeService.getCurrentFeeLevel();
|
||||
this.usePushNotifications = isCordova && !isMobile.Windows();
|
||||
$scope.PNEnabledByUser = true;
|
||||
$scope.isIOS = isMobile.iOS();
|
||||
if (!typeof cordova.plugins.diagnostic != undefined && $scope.isIOS) {
|
||||
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
|
||||
$scope.PNEnabledByUser = isEnabled;
|
||||
});
|
||||
}
|
||||
$scope.spendUnconfirmed = config.wallet.spendUnconfirmed;
|
||||
$scope.glideraEnabled = config.glidera.enabled;
|
||||
$scope.glideraTestnet = config.glidera.testnet;
|
||||
$scope.pushNotifications = config.pushNotifications.enabled;
|
||||
};
|
||||
|
||||
this.openSettings = function() {
|
||||
cordova.plugins.diagnostic.switchToSettings(function() {
|
||||
$log.debug('switched to settings');
|
||||
}, function(err) {
|
||||
$log.debug(err);
|
||||
});
|
||||
}
|
||||
|
||||
var unwatchSpendUnconfirmed = $scope.$watch('spendUnconfirmed', function(newVal, oldVal) {
|
||||
if (newVal == oldVal) return;
|
||||
var opts = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue