Review navigation

This commit is contained in:
Tankred Hase 2014-12-12 10:49:16 +01:00
parent c3efeb1132
commit 276a82e5ef
1 changed files with 4 additions and 6 deletions

View File

@ -61,11 +61,9 @@ var NavigationCtrl = function($scope, $location, account, email, outbox, notific
}
// navigate to folder[folderIndex]
if ($scope.account.folders && $scope.account.folders.length > folderIndex) {
// navigate to the selected folder index
$scope.state.nav.currentFolder = $scope.account.folders[folderIndex];
$scope.state.nav.toggle(false);
}
// navigate to the selected folder index
$scope.state.nav.currentFolder = $scope.account.folders[folderIndex];
$scope.state.nav.toggle(false);
});
// nav open/close state url watcher
@ -137,7 +135,7 @@ var NavigationCtrl = function($scope, $location, account, email, outbox, notific
// select inbox if not yet selected
if (!$scope.state.nav.currentFolder) {
$location.search('folder', 0);
$scope.navigate(0);
}
});