clean and remove bug home

This commit is contained in:
Jean-Baptiste Dominguez 2018-08-09 15:13:29 +09:00
commit b742eadd4e

View file

@ -20,7 +20,12 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.bannerUrl = ''; $scope.bannerUrl = '';
$scope.$on("$ionicView.afterEnter", function() { $scope.$on("$ionicView.beforeEnter", onBeforeEnter);
$scope.$on("$ionicView.enter", onEnter);
$scope.$on("$ionicView.afterEnter", onAfterEnter);
$scope.$on("$ionicView.leave", onLeave);
function onAfterEnter () {
startupService.ready(); startupService.ready();
bannerService.getBanner(function (banner) { bannerService.getBanner(function (banner) {
@ -28,9 +33,9 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.bannerUrl = banner.url; $scope.bannerUrl = banner.url;
$scope.bannerIsLoading = false; $scope.bannerIsLoading = false;
}); });
}); };
$scope.$on("$ionicView.beforeEnter", function(event, data) { function onBeforeEnter (event, data) {
if (!$scope.homeTip) { if (!$scope.homeTip) {
storageService.getHomeTipAccepted(function(error, value) { storageService.getHomeTipAccepted(function(error, value) {
@ -52,11 +57,10 @@ angular.module('copayApp.controllers').controller('tabHomeController',
} }
}); });
} }
}); };
$scope.$on("$ionicView.enter", function(event, data) { function onEnter(event, data) {
$ionicNavBarDelegate.showBar(true); $ionicNavBarDelegate.showBar(true);
updateAllWallets();
addressbookService.list(function(err, ab) { addressbookService.list(function(err, ab) {
if (err) $log.error(err); if (err) $log.error(err);
@ -104,13 +108,13 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.$apply(); $scope.$apply();
}, 10); }, 10);
}); });
}); };
$scope.$on("$ionicView.leave", function(event, data) { function onLeave (event, data) {
lodash.each(listeners, function(x) { lodash.each(listeners, function(x) {
x(); x();
}); });
}); };
$scope.createdWithinPastDay = function(time) { $scope.createdWithinPastDay = function(time) {
return timeService.withinPastDay(time); return timeService.withinPastDay(time);