aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/parser
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-05 21:37:40 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-05 21:37:40 +0100
commit22538145196c5d7b5f30c2d8ad55b7893c80c1ff (patch)
treee9be292e9a1ae28c88e9e0c7cd54062b7a3899ad /src/main/java/eu/siacs/conversations/parser
parent6a43bda4d73bb40ccb88171151fa8e6e7ffc37d1 (diff)
fixed notifications for images
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 5b22ad61b..472a2e461 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -401,12 +401,6 @@ public class MessageParser extends AbstractParser implements
@Override
public void onMessagePacketReceived(Account account, MessagePacket packet) {
Message message = null;
- boolean notify = mXmppConnectionService.getPreferences().getBoolean(
- "show_notification", true);
- boolean alwaysNotifyInConference = notify
- && mXmppConnectionService.getPreferences().getBoolean(
- "always_notify_in_conference", false);
-
this.parseNick(packet, account);
if ((packet.getType() == MessagePacket.TYPE_CHAT || packet.getType() == MessagePacket.TYPE_NORMAL)) {
@@ -429,7 +423,6 @@ public class MessageParser extends AbstractParser implements
if (message != null) {
if (message.getStatus() == Message.STATUS_SEND) {
account.activateGracePeriod();
- notify = false;
mXmppConnectionService.markRead(
message.getConversation(), false);
} else {
@@ -444,14 +437,10 @@ public class MessageParser extends AbstractParser implements
if (message != null) {
if (message.getStatus() == Message.STATUS_RECEIVED) {
message.markUnread();
- notify = alwaysNotifyInConference
- || NotificationService
- .wasHighlightedOrPrivate(message);
} else {
mXmppConnectionService.markRead(message.getConversation(),
false);
account.activateGracePeriod();
- notify = false;
}
}
} else if (packet.getType() == MessagePacket.TYPE_ERROR) {
@@ -498,10 +487,7 @@ public class MessageParser extends AbstractParser implements
if (message.trusted() && message.bodyContainsDownloadable()) {
this.mXmppConnectionService.getHttpConnectionManager()
.createNewConnection(message);
- notify = false;
- }
- notify = notify && !conversation.isMuted();
- if (notify) {
+ } else {
mXmppConnectionService.getNotificationService().push(message);
}
mXmppConnectionService.updateConversationUi();