Hide nav-bar on amount/confirm and addressbook views
This commit is contained in:
parent
db7f4fcbe6
commit
ec875f7b1b
5 changed files with 31 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabsController', function($log, $scope, $stateParams, $ionicModal, $timeout, incomingData) {
|
||||
angular.module('copayApp.controllers').controller('tabsController', function($rootScope, $log, $scope, $state, $stateParams, $timeout, incomingData, lodash) {
|
||||
|
||||
$scope.onScan = function(data) {
|
||||
if (!incomingData.redir(data)) {
|
||||
|
|
@ -22,6 +22,28 @@ angular.module('copayApp.controllers').controller('tabsController', function($lo
|
|||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
}
|
||||
};
|
||||
|
||||
var hideTabsViews = [
|
||||
'tabs.send.amount',
|
||||
'tabs.send.confirm',
|
||||
'tabs.send.addressbook',
|
||||
'tabs.addressbook',
|
||||
'tabs.addressbook.add',
|
||||
'tabs.addressbook.view',
|
||||
];
|
||||
|
||||
$rootScope.$on('$ionicView.beforeEnter', function() {
|
||||
|
||||
$rootScope.hideTabs = false;
|
||||
|
||||
var currentState = $state.current.name;
|
||||
|
||||
lodash.each(hideTabsViews, function(view) {
|
||||
if (currentState === view) {
|
||||
$rootScope.hideTabs = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue