From 4ac070d29eb4d167751669f7a2efb0720b8f42fe Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 23 Feb 2017 12:01:06 -0300 Subject: [PATCH 1/3] Fix error log when refresh view from walletDetails --- src/js/controllers/walletDetails.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 8756efd59..40579a52a 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -340,6 +340,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.walletId = data.stateParams.walletId; $scope.wallet = profileService.getWallet($scope.walletId); + if (!$scope.wallet) return; $scope.requiresMultipleSignatures = $scope.wallet.credentials.m > 1; addressbookService.list(function(err, ab) { From 99702ec001594621976dfae03c2d7e47739dca09 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 23 Feb 2017 12:02:38 -0300 Subject: [PATCH 2/3] Fix tab-home after a hard refresh or resume --- src/js/routes.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/js/routes.js b/src/js/routes.js index f29107c6f..dce44e5a7 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1177,7 +1177,16 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr profileService.storeProfileIfDirty(); $log.debug('Profile loaded ... Starting UX.'); scannerService.gentleInitialize(); - $state.go('tabs.home'); + // Reload tab-home if necessary (from root path: starting) + $state.go('starting', {}, { + 'reload': true, + 'notify': $state.current.name == 'starting' ? false : true + }).then(function() { + $ionicHistory.nextViewOptions({ + disableAnimate: true + }); + $state.transitionTo('tabs.home'); + }); } // After everything have been loaded, initialize handler URL From 35fd64d558e460aa15d1c9653fa43d4a5cc3332e Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 23 Feb 2017 13:55:12 -0300 Subject: [PATCH 3/3] Clear history on start --- src/js/routes.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/routes.js b/src/js/routes.js index dce44e5a7..9f92325fc 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1183,9 +1183,13 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr 'notify': $state.current.name == 'starting' ? false : true }).then(function() { $ionicHistory.nextViewOptions({ - disableAnimate: true + disableAnimate: true, + historyRoot: true + }); + $state.transitionTo('tabs.home').then(function() { + // Clear history + $ionicHistory.clearHistory(); }); - $state.transitionTo('tabs.home'); }); }