From 0d90af5ec1410b0f32647727d7a96703008a7825 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Thu, 27 Nov 2014 15:15:44 +0100 Subject: [PATCH] Fix bug where read mode is closed after marking email as read --- src/js/controller/app/action-bar.js | 6 ++++-- src/js/controller/app/mail-list.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/controller/app/action-bar.js b/src/js/controller/app/action-bar.js index dac48a8..79a377d 100644 --- a/src/js/controller/app/action-bar.js +++ b/src/js/controller/app/action-bar.js @@ -96,7 +96,7 @@ var ActionBarCtrl = function($scope, email, dialog, statusDisplay) { * @param {Object} message The message to be marked * @param {boolean} unread If the message should be marked as read or unread */ - $scope.markMessage = function(message, unread) { + $scope.markMessage = function(message, unread, keepOpen) { if (!message) { return; } @@ -104,7 +104,9 @@ var ActionBarCtrl = function($scope, email, dialog, statusDisplay) { statusDisplay.update('Updating unread flag...'); // close read state - $scope.state.read.open = false; + if (!keepOpen) { + $scope.state.read.open = false; + } var originalState = message.unread; message.unread = unread; diff --git a/src/js/controller/app/mail-list.js b/src/js/controller/app/mail-list.js index 460c2e7..3e142eb 100644 --- a/src/js/controller/app/mail-list.js +++ b/src/js/controller/app/mail-list.js @@ -94,7 +94,7 @@ var MailListCtrl = function($scope, $timeout, $routeParams, statusDisplay, notif } } - $scope.state.actionBar.markMessage(message, false); + $scope.state.actionBar.markMessage(message, false, true); } };