Do not notify about auto-read messages. For example when setting spam to be
marked as read automatically I don't really want to get the notification alert. This has been laying around on my drive for a long time now... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31028 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f835a75f31
commit
45041904b4
@ -8,6 +8,7 @@
|
||||
#include <String.h>
|
||||
#include <Alert.h>
|
||||
#include <Beep.h>
|
||||
#include <Path.h>
|
||||
#include <Application.h>
|
||||
|
||||
#include <MailAddon.h>
|
||||
@ -63,15 +64,20 @@ status_t NotifyFilter::InitCheck(BString* err)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
status_t NotifyFilter::ProcessMailMessage(BPositionIO**, BEntry*, BMessage*headers, BPath*, const char*)
|
||||
status_t NotifyFilter::ProcessMailMessage(BPositionIO**, BEntry*, BMessage*headers, BPath*path, const char*)
|
||||
{
|
||||
if (callback == NULL) {
|
||||
callback = new NotifyCallback(strategy,_runner,this);
|
||||
_runner->RegisterProcessCallback(callback);
|
||||
}
|
||||
|
||||
if (!headers->FindBool("ENTIRE_MESSAGE"))
|
||||
callback->num_messages ++;
|
||||
if (!headers->FindBool("ENTIRE_MESSAGE")) {
|
||||
BString status;
|
||||
headers->FindString("STATUS", &status);
|
||||
// do not notify about auto-read messages
|
||||
if (status.Compare("Read") != 0)
|
||||
callback->num_messages ++;
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user