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