mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-25 08:58:55 -05:00
notify on incomming received carbon messages
This commit is contained in:
parent
b9243033df
commit
34bd79ac04
@ -136,10 +136,12 @@ public class XmppConnectionService extends Service {
|
||||
|| (packet.hasChild("sent"))) {
|
||||
message = MessageParser.parseCarbonMessage(packet, account,
|
||||
service);
|
||||
if (message != null) {
|
||||
if ((message != null)&&(message.getStatus() == Message.STATUS_SEND)) {
|
||||
message.getConversation().markRead();
|
||||
}
|
||||
notify = false;
|
||||
} else {
|
||||
notify = true;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (packet.getType() == MessagePacket.TYPE_GROUPCHAT) {
|
||||
|
@ -191,9 +191,15 @@ public class UIHelper {
|
||||
|
||||
List<Conversation> unread = new ArrayList<Conversation>();
|
||||
for (Conversation conversation : conversations) {
|
||||
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
||||
if ((!conversation.isRead())&&((wasHighlighted(conversation)||(alwaysNotify)))) {
|
||||
unread.add(conversation);
|
||||
}
|
||||
} else {
|
||||
if (!conversation.isRead()) {
|
||||
unread.add(conversation);
|
||||
}
|
||||
}
|
||||
}
|
||||
String ringtone = preferences.getString("notification_ringtone", null);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user