Author: czeidler Date: 2011-02-21 21:08:46 +0100 (Mon, 21 Feb 2011) New Revision: 40603 Changeset: http://dev.haiku-os.org/changeset/40603 Modified: haiku/trunk/src/apps/mail/MailWindow.cpp Log: Don't mark read messages as seen when closing the mail window. Modified: haiku/trunk/src/apps/mail/MailWindow.cpp =================================================================== --- haiku/trunk/src/apps/mail/MailWindow.cpp 2011-02-21 18:59:58 UTC (rev 40602) +++ haiku/trunk/src/apps/mail/MailWindow.cpp 2011-02-21 20:08:46 UTC (rev 40603) @@ -1732,8 +1732,16 @@ } } 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));