From c4504be725b85d7b95b297691055c58c95beba16 Mon Sep 17 00:00:00 2001 From: Steven Luo Date: Sun, 29 May 2011 17:48:57 -0700 Subject: [PATCH] Notify the user on receipt of all private messages, not just ones with nick mentions You'd rarely use someone's nick in a privmsg with them, and this matches the behavior of other clients. --- .../src/org/yaaic/irc/IRCConnection.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/application/src/org/yaaic/irc/IRCConnection.java b/application/src/org/yaaic/irc/IRCConnection.java index 6b9d0f1..62f3bfb 100644 --- a/application/src/org/yaaic/irc/IRCConnection.java +++ b/application/src/org/yaaic/irc/IRCConnection.java @@ -244,15 +244,18 @@ public class IRCConnection extends PircBot service.sendBroadcast(intent); } - if (isMentioned(action)) { - // highlight - message.setColor(Message.COLOR_RED); + boolean mentioned = isMentioned(action); + if (mentioned || target.equals(this.getNick())) { service.updateNotification( target + ": " + sender + " " + action, service.getSettings().isVibrateHighlightEnabled(), service.getSettings().isSoundHighlightEnabled() ); + } + if (mentioned) { + // highlight + message.setColor(Message.COLOR_RED); conversation.setStatus(Conversation.STATUS_HIGHLIGHT); } } @@ -608,14 +611,14 @@ public class IRCConnection extends PircBot service.sendBroadcast(intent); } + service.updateNotification( + "<" + sender + "> " + text, + service.getSettings().isVibrateHighlightEnabled(), + service.getSettings().isSoundHighlightEnabled() + ); + if (isMentioned(text)) { message.setColor(Message.COLOR_RED); - service.updateNotification( - "<" + sender + "> " + text, - service.getSettings().isVibrateHighlightEnabled(), - service.getSettings().isSoundHighlightEnabled() - ); - conversation.setStatus(Conversation.STATUS_HIGHLIGHT); } }