clean and remove bug home
This commit is contained in:
parent
9bdd44a483
commit
b742eadd4e
1 changed files with 14 additions and 10 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue