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; } //