From 179896ddfeeb6aada57646f8d520466e03ea63a6 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 21 Feb 2014 10:47:49 +0100 Subject: [PATCH] fix desktop for grunt dev --- src/js/controller/mail-list.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/js/controller/mail-list.js b/src/js/controller/mail-list.js index 1659a38..f4ccfdd 100644 --- a/src/js/controller/mail-list.js +++ b/src/js/controller/mail-list.js @@ -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) {