From 47d780d247be2df9151d720fdd790acaf3fe86c3 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Mon, 21 Feb 2011 20:08:46 +0000 Subject: [PATCH] Don't mark read messages as seen when closing the mail window. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40603 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mail/MailWindow.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/apps/mail/MailWindow.cpp b/src/apps/mail/MailWindow.cpp index de1ec47ee6..b870ef8359 100644 --- a/src/apps/mail/MailWindow.cpp +++ b/src/apps/mail/MailWindow.cpp @@ -1732,8 +1732,16 @@ TMailWindow::QuitRequested() } } else if (fRef != NULL && !sKeepStatusOnQuit) { // ...Otherwise just set the message read - read_flags flag = (fAutoMarkRead == true) ? B_READ : B_SEEN; - SetCurrentMessageRead(flag); + if (fAutoMarkRead == true) + SetCurrentMessageRead(B_READ); + else { + BNode node(fRef); + read_flags currentFlag; + if (read_read_attr(node, currentFlag) != B_OK) + currentFlag = B_UNREAD; + if (currentFlag == B_UNREAD) + SetCurrentMessageRead(B_SEEN); + } } BPrivate::BPathMonitor::StopWatching(BMessenger(this, this));