fix desktop for grunt dev

This commit is contained in:
Tankred Hase 2014-02-21 10:47:49 +01:00
parent dd9ea28772
commit 179896ddfe
1 changed files with 5 additions and 11 deletions

View File

@ -67,10 +67,7 @@ define(function(require) {
emailDao.getBody({ emailDao.getBody({
folder: getFolder().path, folder: getFolder().path,
message: email message: email
}, function(error) { }, $scope.onError);
$scope.$apply();
$scope.onError(error);
});
}; };
/** /**
@ -83,19 +80,16 @@ define(function(require) {
return; return;
} }
$scope.state.mailList.selected = email;
$scope.state.read.toggle(true);
// if we're in the outbox, don't decrypt as usual // if we're in the outbox, don't decrypt as usual
if (getFolder().type !== 'Outbox') { if (getFolder().type !== 'Outbox') {
emailDao.decryptMessageContent({ emailDao.decryptMessageContent({
message: email message: email
}, function(error) { }, $scope.onError);
$scope.$apply();
$scope.onError(error);
});
} }
$scope.state.mailList.selected = email;
$scope.state.read.toggle(true);
// if the email is unread, please sync the new state. // if the email is unread, please sync the new state.
// otherweise forget about it. // otherweise forget about it.
if (!email.unread) { if (!email.unread) {