Mail: Fix 'Leave as 'New'

When closing an unread email via "Close | Leave as 'New'", it's
still set to MAIL:status "Read".
IComparing the BString read from the MAIL:status attribute returns
"0" for a match, which the if-statement turns to false...

Change-Id: I4c3846fd39a6056e4bed8388e41dbf4929798799
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1865
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Humdinger 2019-09-14 21:56:16 +02:00 committed by waddlesplash
parent 9b695ae61d
commit 4015b5877f

View File

@ -189,7 +189,7 @@ read_read_attr(BNode& node, read_flags& flag)
BString statusString; BString statusString;
if (node.ReadAttrString(B_MAIL_ATTR_STATUS, &statusString) == B_OK) { if (node.ReadAttrString(B_MAIL_ATTR_STATUS, &statusString) == B_OK) {
if (statusString.ICompare("New")) if (statusString.ICompare("New") == 0)
flag = B_UNREAD; flag = B_UNREAD;
else else
flag = B_READ; flag = B_READ;