aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Conversation.java8
-rw-r--r--src/main/java/eu/siacs/conversations/services/NotificationService.java4
2 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java
index c3440b3e..ad7dbc55 100644
--- a/src/main/java/eu/siacs/conversations/entities/Conversation.java
+++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java
@@ -873,6 +873,9 @@ public class Conversation extends AbstractEntity implements Blockable {
}
public int unreadCount() {
+ if (getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL,0) == Long.MAX_VALUE) {
+ return 0;
+ }
synchronized (this.messages) {
int count = 0;
for(int i = this.messages.size() - 1; i >= 0; --i) {
@@ -880,10 +883,7 @@ public class Conversation extends AbstractEntity implements Blockable {
if (message.isRead()) {
return count;
}
- if (getMode() == Conversation.MODE_SINGLE
- || ConversationsPlusPreferences.alwaysNotifyInConference()
- || MessageUtil.wasHighlightedOrPrivate(message)
- ) {
+ if (alwaysNotify() || MessageUtil.wasHighlightedOrPrivate(message)) {
++count;
}
}
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java
index 467924ef..0f40e8d7 100644
--- a/src/main/java/eu/siacs/conversations/services/NotificationService.java
+++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java
@@ -64,9 +64,7 @@ public class NotificationService {
&& !message.isRead()
&& ConversationsPlusPreferences.showNotification()
&& !message.getConversation().isMuted()
- && (message.getConversation().getMode() == Conversation.MODE_SINGLE
- || ConversationsPlusPreferences.alwaysNotifyInConference()
- || wasHighlightedOrPrivate(message)
+ && (message.getConversation().alwaysNotify() || wasHighlightedOrPrivate(message)
);
}