From 16dcb556e4350f11c89054a40335512c6a98afee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 29 Mar 2016 16:52:35 -0400 Subject: [PATCH] if pn was not enabled by user, do not show pn options --- cordova/build.sh | 7 ++++--- public/views/preferencesGlobal.html | 2 +- src/js/controllers/preferencesGlobal.js | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cordova/build.sh b/cordova/build.sh index b171a68f6..3106908b4 100755 --- a/cordova/build.sh +++ b/cordova/build.sh @@ -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 - - diff --git a/public/views/preferencesGlobal.html b/public/views/preferencesGlobal.html index 97234d94f..c0df8be0a 100644 --- a/public/views/preferencesGlobal.html +++ b/public/views/preferencesGlobal.html @@ -48,7 +48,7 @@
Use Unconfirmed Funds
-
+

  • diff --git a/src/js/controllers/preferencesGlobal.js b/src/js/controllers/preferencesGlobal.js index 8961d7de2..748da7e39 100644 --- a/src/js/controllers/preferencesGlobal.js +++ b/src/js/controllers/preferencesGlobal.js @@ -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) {