always switch enable for android devices

This commit is contained in:
Gabriel Bazán 2016-03-31 11:33:59 -04:00
parent 0c53e52015
commit 86f151de83
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,7 @@
<div translate>About Copay</div>
</li>
</ul>
<div ng-show="index.usePushNotifications && !PNEnabledByUser && !isAndroid">
<div ng-show="prefGlobal.usePushNotifications && !PNEnabledByUser && isIOS">
<div class="text-centered text-gray size-12 m10" translate>Push notifications for Copay are currently disabled. Enable them in the Settings app.</div>
<ul class="no-bullet m0" ng-click="prefGlobal.openSettings()">
<li ng-style="{'color':index.backgroundColor}" translate>Open Settings app</li>

View File

@ -14,7 +14,9 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
this.feeOpts = feeService.feeOpts;
this.currentFeeLevel = feeService.getCurrentFeeLevel();
this.usePushNotifications = isCordova && !isMobile.Windows();
if (!typeof cordova.plugins.diagnostic != undefined && isMobile.iOS()) {
$scope.PNEnabledByUser = true;
$scope.isIOS = isMobile.iOS();
if (!typeof cordova.plugins.diagnostic != undefined && $scope.isIOS) {
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled;
});