From f3b4140f81ab7771811439aa88edd8650ea6435d Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Sat, 19 Oct 2013 03:55:12 +0200 Subject: [PATCH] fix ciphertext preview reload --- src/js/controller/mail-list.js | 2 +- src/js/controller/write.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/js/controller/mail-list.js b/src/js/controller/mail-list.js index dc543c5..16e9bb1 100644 --- a/src/js/controller/mail-list.js +++ b/src/js/controller/mail-list.js @@ -100,7 +100,7 @@ define(function(require) { return; } // set unread count in folder model - getFolder().count = (unreadCount && unreadCount > 0) ? unreadCount : undefined; + getFolder().count = unreadCount; $scope.$apply(); emailDao.imapSync(options, function(err) { diff --git a/src/js/controller/write.js b/src/js/controller/write.js index 1682b30..fbd45f8 100644 --- a/src/js/controller/write.js +++ b/src/js/controller/write.js @@ -24,6 +24,7 @@ define(function(require) { resetFields(); if ($scope.writerReply) { fillFields($scope.selected); + $scope.updatePreview(); } }); @@ -31,7 +32,10 @@ define(function(require) { $scope.writerTitle = 'New email'; $scope.to = undefined; $scope.subject = undefined; - $scope.body = undefined; + if ($scope.$$childTail) { + $scope.$$childTail.body = ''; + } + $scope.ciphertextPreview = undefined; } function fillFields(re) { @@ -54,7 +58,7 @@ define(function(require) { bodyRows.forEach(function(row) { body += (!re.html) ? '
' + row : ''; }); - $scope.body = body; + $scope.$$childTail.body = body; } //