load data after transition

This commit is contained in:
JDonadio 2017-02-02 18:04:08 -03:00
commit 004336e64f

View file

@ -347,12 +347,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.addressbook = ab || {}; $scope.addressbook = ab || {};
}); });
$scope.updateAll();
refreshAmountSection();
listeners = [ listeners = [
$rootScope.$on('bwsEvent', function(e, walletId) { $rootScope.$on('bwsEvent', function(e, walletId) {
if (walletId == $scope.wallet.id && e.type!='NewAddress') if (walletId == $scope.wallet.id && e.type != 'NewAddress')
$scope.updateAll(); $scope.updateAll();
}), }),
$rootScope.$on('Local/TxAction', function(e, walletId) { $rootScope.$on('Local/TxAction', function(e, walletId) {
@ -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) { $scope.$on("$ionicView.beforeLeave", function(event, data) {
if ($window.StatusBar) { if ($window.StatusBar) {
$window.StatusBar.backgroundColorByHexString('#1e3186'); $window.StatusBar.backgroundColorByHexString('#1e3186');