git clone of logicmail with some fixes/features added
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

only do notification when recent messages are also unseen

outbound messages bcc'd to myself get pushed to my inbox after being
marked seen on the server, so those messages should not be
considered "new". previously these would trigger a new mail
notification because they were recent, but as soon as the mailbox
would get synched, the notification would (properly) get dismissed.
now no notification is generated at all for recent+seen messages.

+6 -6
+6 -6
LogicMail/src/org/logicprobe/LogicMail/ui/NotificationHandlerBB45.java
··· 152 152 153 153 switch(e.getType()) { 154 154 case MailboxNodeEvent.TYPE_NEW_MESSAGES: 155 - boolean raiseNotification = messagesAreRecent(e.getAffectedMessages()); 155 + boolean raiseNotification = messagesAreUnseen(e.getAffectedMessages()); 156 156 if(raiseNotification && !notificationTriggered) { 157 157 notificationTriggered = true; 158 158 triggerNotification(mailboxNode); ··· 167 167 } 168 168 } 169 169 170 - private boolean messagesAreRecent(MessageNode[] messages) { 171 - boolean recent = false; 170 + private boolean messagesAreUnseen(MessageNode[] messages) { 171 + boolean unseen = false; 172 172 for(int i=0; i<messages.length; i++) { 173 - if((messages[i].getFlags() & MessageNode.Flag.RECENT) != 0) { 174 - recent = true; 173 + if((messages[i].getFlags() & MessageNode.Flag.RECENT) != 0 && (messages[i].getFlags() & MessageNode.Flag.SEEN) == 0) { 174 + unseen = true; 175 175 break; 176 176 } 177 177 } 178 - return recent; 178 + return unseen; 179 179 } 180 180 181 181 private void updateMessageIndicator() {