Fix hideTabs

This commit is contained in:
Gustavo Maximiliano Cortez 2016-10-16 21:51:50 -03:00
commit 1b56e48cf7
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
11 changed files with 23 additions and 39 deletions

View file

@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro
if (!incomingData.redir(data)) {
popupService.showAlert(null, gettextCatalog.getString('Invalid data'));
}
}
};
$scope.setScanFn = function(scanFn) {
$scope.scan = function() {
@ -22,33 +22,4 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro
}, 1);
};
var hideTabsViews = [
'tabs.send.amount',
'tabs.send.confirm',
'tabs.send.addressbook',
'tabs.addressbook',
'tabs.addressbook.add',
'tabs.addressbook.view',
'tabs.preferences.backupWarning',
'tabs.preferences.backup',
'tabs.receive.backupWarning',
'tabs.receive.backup',
'tabs.bitpayCard.amount',
'tabs.bitpayCard.confirm',
'tabs.bitpayCardIntro'
];
$rootScope.$on('$ionicView.beforeEnter', function() {
$rootScope.hideTabs = false;
var currentState = $state.current.name;
lodash.each(hideTabsViews, function(view) {
if (currentState === view) {
$rootScope.hideTabs = true;
}
});
});
});