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
parent 9a10394cd9
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
checkOK
cordova plugin add cordova.plugins.diagnostic
checkOK
cordova plugin add cordova-plugin-splashscreen
checkOK
@ -190,7 +193,7 @@ if [ $CURRENT_OS == "ANDROID" ]; then
# cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml
# checkOK
cp android/build-extras.gradle $PROJECT/platforms/android/build-extras.gradle
checkOK
@ -243,5 +246,3 @@ if [ $CURRENT_OS == "WP8" ]; then
checkOK
fi
fi

View File

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

View File

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