fix bugs in phone

This commit is contained in:
Gabriel Bazán 2015-11-24 12:21:13 -03:00
parent 999c3e7d5d
commit 93e9fa7d3b
3 changed files with 14 additions and 6 deletions

View File

@ -18,7 +18,7 @@
ng-controller="indexController as index"
ng-swipe-disable-mouse
ng-swipe-left="index.closeMenu()"
ng-swipe-right="index.openMenu()">
ng-swipe-right="index.agreeDisclaimer ? index.openMenu()">
<div class="off-canvas-wrap" id="off-canvas-wrap">
<div class="inner-wrap">

View File

@ -135,6 +135,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.openWallet();
});
}
storageService.getCopayDisclaimerFlag(function(err, val) {
self.agreeDisclaimer = val;
});
});
};

View File

@ -457,7 +457,8 @@ angular
url: '/cordova/:status/:isHome',
views: {
'main': {
controller: function($rootScope, $state, $stateParams, $timeout, go, isCordova) {
controller: function($rootScope, $state, $stateParams, $timeout, go, isCordova, storageService) {
switch ($stateParams.status) {
case 'resume':
$rootScope.$emit('Local/Resume');
@ -470,10 +471,14 @@ angular
}
break;
};
$timeout(function() {
$rootScope.$emit('Local/SetTab', 'walletHome', true);
}, 100);
go.walletHome();
storageService.getCopayDisclaimerFlag(function(err, val) {
if (!val) navigator.app.exitApp();
$timeout(function() {
$rootScope.$emit('Local/SetTab', 'walletHome', true);
}, 100);
go.walletHome();
});
}
}
},