Don't alter custom status attribute. Part of #7290.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40729 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -94,6 +94,15 @@ write_read_attr(BNode& node, read_flags flag)
|
|||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
#if R5_COMPATIBLE
|
#if R5_COMPATIBLE
|
||||||
|
// manage the status string only if it currently has a "read" status
|
||||||
|
BString currentStatus;
|
||||||
|
if (node.ReadAttrString(B_MAIL_ATTR_STATUS, ¤tStatus) == B_OK) {
|
||||||
|
if (currentStatus.ICompare("New") != 0
|
||||||
|
&& currentStatus.ICompare("Read") != 0
|
||||||
|
&& currentStatus.ICompare("Seen") != 0)
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
const char* statusString = (flag == B_READ) ? "Read"
|
const char* statusString = (flag == B_READ) ? "Read"
|
||||||
: (flag == B_SEEN) ? "Seen" : "New";
|
: (flag == B_SEEN) ? "Seen" : "New";
|
||||||
if (node.WriteAttr(B_MAIL_ATTR_STATUS, B_STRING_TYPE, 0, statusString,
|
if (node.WriteAttr(B_MAIL_ATTR_STATUS, B_STRING_TYPE, 0, statusString,
|
||||||
|
|||||||
Reference in New Issue
Block a user