if pn was not enabled by user, do not show pn options

This commit is contained in:
Gabriel Bazán 2016-03-29 16:52:35 -04:00
commit 16dcb556e4
3 changed files with 8 additions and 4 deletions

View file

@ -97,6 +97,9 @@ if [ ! -d $PROJECT ]; then
cordova plugin add cordova-plugin-globalization cordova plugin add cordova-plugin-globalization
checkOK checkOK
cordova plugin add cordova.plugins.diagnostic
checkOK
cordova plugin add cordova-plugin-splashscreen cordova plugin add cordova-plugin-splashscreen
checkOK checkOK
@ -190,7 +193,7 @@ if [ $CURRENT_OS == "ANDROID" ]; then
# cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml # cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml
# checkOK # checkOK
cp android/build-extras.gradle $PROJECT/platforms/android/build-extras.gradle cp android/build-extras.gradle $PROJECT/platforms/android/build-extras.gradle
checkOK checkOK
@ -243,5 +246,3 @@ if [ $CURRENT_OS == "WP8" ]; then
checkOK checkOK
fi fi
fi fi

View file

@ -48,7 +48,7 @@
<div translate>Use Unconfirmed Funds</div> <div translate>Use Unconfirmed Funds</div>
</li> </li>
</ul> </ul>
<div ng-show="prefGlobal.usePushNotifications"> <div ng-show="prefGlobal.usePushNotifications && PNEnabledByUser">
<h4></h4> <h4></h4>
<ul class="no-bullet m0"> <ul class="no-bullet m0">
<li> <li>

View file

@ -18,6 +18,9 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
$scope.glideraEnabled = config.glidera.enabled; $scope.glideraEnabled = config.glidera.enabled;
$scope.glideraTestnet = config.glidera.testnet; $scope.glideraTestnet = config.glidera.testnet;
$scope.pushNotifications = config.pushNotifications.enabled; $scope.pushNotifications = config.pushNotifications.enabled;
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled;
});
}; };
var unwatchSpendUnconfirmed = $scope.$watch('spendUnconfirmed', function(newVal, oldVal) { var unwatchSpendUnconfirmed = $scope.$watch('spendUnconfirmed', function(newVal, oldVal) {