Merge pull request #5559 from JDonadio/ref/improve-view-load

Load data after transition
This commit is contained in:
Gustavo Maximiliano Cortez 2017-02-06 11:36:53 -03:00 committed by GitHub
commit 5457eae905

View file

@ -347,9 +347,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.addressbook = ab || {};
});
$scope.updateAll();
refreshAmountSection();
listeners = [
$rootScope.$on('bwsEvent', function(e, walletId) {
if (walletId == $scope.wallet.id && e.type != 'NewAddress')
@ -362,6 +359,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
];
});
$scope.$on("$ionicView.afterEnter", function(event, data) {
$scope.updateAll();
refreshAmountSection();
});
$scope.$on("$ionicView.beforeLeave", function(event, data) {
if ($window.StatusBar) {
$window.StatusBar.backgroundColorByHexString('#1e3186');