From 975f024407b96be285833c318abab1c003770cfb Mon Sep 17 00:00:00 2001 From: Aleksas Pantechovskis Date: Mon, 9 Jan 2012 22:56:16 +0000 Subject: [PATCH] Fix [Read|Unread] buttons behaviour * Allow displaying of "Read" button only for Incoming e-mails. Fixes #4773; * Move to the next message after pressing "Unread" button that is consistent with corresponding "Unread" button case. Fixes #4774; * Those problems were fixed during completing GCI 2011 task. Signed-off-by: Siarzhuk Zharski --- src/apps/mail/MailWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/mail/MailWindow.cpp b/src/apps/mail/MailWindow.cpp index f3a723b69f..e204cb8ece 100644 --- a/src/apps/mail/MailWindow.cpp +++ b/src/apps/mail/MailWindow.cpp @@ -1478,6 +1478,7 @@ TMailWindow::MessageReceived(BMessage *msg) case M_UNREAD: MarkMessageRead(fRef, B_SEEN); _UpdateReadButton(); + PostMessage(M_NEXTMSG); break; case M_READ: wasReadMsg = true; @@ -3190,7 +3191,7 @@ TMailWindow::_UpdateReadButton() if (fApp->ShowButtonBar()) { fButtonBar->RemoveButton(fReadButton); fReadButton = NULL; - if (!fAutoMarkRead) + if (!fAutoMarkRead && fIncoming) _AddReadButton(); } UpdateViews();