From ad1eee6c9c07adb9fcbeb2052f1a66bd98a67f61 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Thu, 30 Oct 2014 11:07:15 -0300 Subject: [PATCH 1/2] added refresh to settings page --- js/controllers/more.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/controllers/more.js b/js/controllers/more.js index 210fa4c2c..c0bc36b39 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -75,6 +75,10 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.secret = w.getSecret(); } + setTimeout(function() { + $scope.$digest(); + }, 1); + $scope.downloadBackup = function() { backupService.walletDownload(w); } From dcab904f50ea28427fcb9c81ddd7640fe2336b90 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Thu, 30 Oct 2014 11:34:40 -0300 Subject: [PATCH 2/2] reorganized method definitions --- js/controllers/more.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/js/controllers/more.js b/js/controllers/more.js index c0bc36b39..48fe1103b 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -54,19 +54,6 @@ angular.module('copayApp.controllers').controller('MoreController', } } - $scope.save = function() { - w.changeSettings({ - unitName: $scope.selectedUnit.shortName, - unitToSatoshi: $scope.selectedUnit.value, - unitDecimals: $scope.selectedUnit.decimals, - alternativeName: $scope.selectedAlternative.name, - alternativeIsoCode: $scope.selectedAlternative.isoCode, - }); - notification.success('Success', $filter('translate')('settings successfully updated')); - controllerUtils.updateBalance(); - }; - - $scope.hideAdv = true; $scope.hidePriv = true; $scope.hideSecret = true; @@ -79,6 +66,18 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.$digest(); }, 1); + $scope.save = function() { + w.changeSettings({ + unitName: $scope.selectedUnit.shortName, + unitToSatoshi: $scope.selectedUnit.value, + unitDecimals: $scope.selectedUnit.decimals, + alternativeName: $scope.selectedAlternative.name, + alternativeIsoCode: $scope.selectedAlternative.isoCode, + }); + notification.success('Success', $filter('translate')('settings successfully updated')); + controllerUtils.updateBalance(); + }; + $scope.downloadBackup = function() { backupService.walletDownload(w); }