Fix changing folder in chrome app

This commit is contained in:
Tankred Hase 2014-12-05 16:57:53 +01:00
parent 2272f3d58f
commit 6f794ff26d
2 changed files with 10 additions and 2 deletions

View File

@ -35,6 +35,14 @@ var NavigationCtrl = function($scope, $location, account, email, outbox, notific
// url/history handling
//
/**
* Close read mode and go to folder
*/
$scope.navigate = function(folderIndex) {
$location.search('uid', null);
$location.search('folder', folderIndex);
};
$scope.loc = $location;
// nav open/close state url watcher

View File

@ -7,7 +7,7 @@
<ul class="nav__folders">
<li ng-repeat="folder in account.folders" ng-if="folder.wellknown" ng-hide="folder.type === 'Outbox' && folder.count < 1"
class="nav__folder" ng-class="{'nav__folder--open': state.nav.currentFolder === folder}">
<a href="#/account?folder={{$index}}">
<a href="#" wo-touch="$event.preventDefault(); navigate($index)">
<svg ng-if="folder.type === 'Inbox'" role="presentation">
<use xlink:href="#icon-inbox" />
</svg>
@ -38,7 +38,7 @@
<ul class="nav__folders">
<li ng-repeat="folder in account.folders" ng-if="!folder.wellknown"
class="nav__folder" ng-class="{'nav__folder--open': state.nav.currentFolder === folder}">
<a href="#/account?folder={{$index}}">
<a href="#" wo-touch="$event.preventDefault(); navigate($index)">
<svg role="presentation"><use xlink:href="#icon-folder" /></svg>
{{folder.name}}
<span ng-show="folder.count > 0" class="nav__counter">{{folder.count}}</span>