From dd3ff93eddafd4bbe3109f3a5e3d7eaa82d8ca1f Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 15 May 2015 14:26:39 -0300 Subject: [PATCH 1/2] Update wallet after resume app. Fix payment-intent --- src/js/routes.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/js/routes.js b/src/js/routes.js index 2a9ed234c..d114ffdef 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -340,7 +340,7 @@ angular url: '/cordova/:status', views: { 'main': { - controller: function($rootScope, $stateParams, go) { + controller: function($rootScope, $stateParams, $timeout, go) { switch ($stateParams.status) { case 'resume': $rootScope.$emit('Local/Resume'); @@ -349,6 +349,9 @@ angular $rootScope.$emit('Local/Offline'); break; }; + $timeout(function() { + $rootScope.$emit('Local/SetTab', 'walletHome', true); + }, 100); go.walletHome(); } } @@ -463,7 +466,7 @@ angular function animateTransition(fromState, toState, event) { - if (isaosp) + if (isaosp || toState.name == 'cordova' || toState.name == 'uri-payment') return true; // Animation in progress? From 0434bd6523902e0990a31f2405766c10e0174b43 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 15 May 2015 19:17:54 -0300 Subject: [PATCH 2/2] refactor fix --- src/js/routes.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/js/routes.js b/src/js/routes.js index d114ffdef..eda4ad198 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -384,6 +384,8 @@ angular var pageWeight = { walletHome: 0, copayers: -1, + cordova: -1, + uri-payment: -1, preferences: 11, preferencesColor: 12, @@ -466,7 +468,7 @@ angular function animateTransition(fromState, toState, event) { - if (isaosp || toState.name == 'cordova' || toState.name == 'uri-payment') + if (isaosp) return true; // Animation in progress? @@ -488,19 +490,27 @@ angular var entering = null, leaving = null; + // Horizontal Slide Animation? if (fromWeight && toWeight) { if (fromWeight > toWeight) { leaving = 'CslideOutRight'; } else { entering = 'CslideInRight'; } + + // Vertical Slide Animation? } else if (fromName && fromWeight >= 0 && toWeight >= 0) { if (toWeight) { entering = 'CslideInUp'; } else { leaving = 'CslideOutDown'; } + + // no Animation ? + } else { + return true; } + var e = document.getElementById('mainSection');