Ticket #7748: MarkAsRead.diff
File MarkAsRead.diff, 1.2 KB (added by , 13 years ago) |
---|
-
HiQ-Data/source/haiku/trunk/src/add-ons/tracker/mark_as/MarkAsRead.cpp
5 5 */ 6 6 7 7 8 #include <E-mail.h> 8 9 #include <Entry.h> 9 10 #include <Message.h> 10 11 #include <Node.h> … … 26 27 BString status("Read"); 27 28 28 29 // Only update the attribute if there is an actual change 29 if (node.ReadAttrString( "MAIL:status", &previousStatus) != B_OK30 if (node.ReadAttrString(B_MAIL_ATTR_STATUS, &previousStatus) != B_OK 30 31 || previousStatus != status) 31 node.WriteAttrString("MAIL:status", &status); 32 node.WriteAttrString(B_MAIL_ATTR_STATUS, &status); 33 34 int32 previousReadStatus; 35 int32 readstatus(B_READ); 36 37 // Only update the attribute if there is an actual change 38 if (node.ReadAttr(B_MAIL_ATTR_READ, B_INT32_TYPE, 0, 39 &previousReadStatus, sizeof(int32)) 40 != B_OK || previousReadStatus != readstatus) 41 node.WriteAttr(B_MAIL_ATTR_READ, B_INT32_TYPE, 0, 42 &readstatus, sizeof(int32)); 32 43 } 33 44 } 34 45 }