mail: use MAIL:status instead of deprecated MAIL:read to query new e-mails

Change-Id: I758cb2b4c3111a300500976d7711e93f9d838a0b
Reviewed-on: https://review.haiku-os.org/687
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Peter Kosyh 2018-11-12 19:37:29 +03:00 committed by waddlesplash
parent 239566d908
commit e0dbea8a60

View File

@ -161,8 +161,8 @@ void DeskbarView::_RefreshMailQuery()
BQuery *newMailQuery = new BQuery;
newMailQuery->SetTarget(this);
newMailQuery->SetVolume(&volume);
newMailQuery->PushAttr(B_MAIL_ATTR_READ);
newMailQuery->PushInt32(B_UNREAD);
newMailQuery->PushAttr(B_MAIL_ATTR_STATUS);
newMailQuery->PushString("New");
newMailQuery->PushOp(B_EQ);
newMailQuery->Fetch();
@ -439,7 +439,7 @@ DeskbarView::_CreateNewMailQuery(BEntry& query)
if (file.InitCheck() != B_OK)
return;
BString string(B_MAIL_ATTR_READ "<2");
BString string(B_MAIL_ATTR_STATUS "==\"New\"");
file.WriteAttrString("_trk/qrystr", &string);
file.WriteAttrString("_trk/qryinitstr", &string);
int32 mode = 'Fbyq';