Don't display Growl notifications for emails which are already marked as read when they are received.
authorEvan Schoenberg
Sun Aug 24 17:16:35 2008 -0400 (2008-08-24)
changeset 4175b19d240b576a
parent 4166 f01fda50f784
child 4176 f5ec2d3d58a0
Don't display Growl notifications for emails which are already marked as read when they are received.

This is a huge usability improvement for my use case and I imagine for that of many others, as I read emails on my phone and other computers throughout the day and don't like my screen flooded with useless notifications when I return and check email.
Extras/GrowlMail/GrowlMail.m
     1.1 --- a/Extras/GrowlMail/GrowlMail.m	Wed Aug 13 02:48:07 2008 -0700
     1.2 +++ b/Extras/GrowlMail/GrowlMail.m	Sun Aug 24 17:16:35 2008 -0400
     1.3 @@ -405,7 +405,10 @@
     1.4  				if (![message isKindOfClass:Message_class])
     1.5  					[self shutDownGrowlMailAndWarn:[NSString stringWithFormat:@"Message in notification was not a Message; it is %@", message]];
     1.6  
     1.7 -				[[self class] showNotificationForMessage:message];
     1.8 +				if (![message respondsToSelector:@selector(isRead)] || ![message isRead]) {
     1.9 +					/* Don't display read messages */
    1.10 +					[[self class] showNotificationForMessage:message];
    1.11 +				}
    1.12  			}
    1.13  			break;
    1.14  		}