aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java
index 52525e481..922ba614f 100644
--- a/src/main/java/de/pixart/messenger/entities/Conversation.java
+++ b/src/main/java/de/pixart/messenger/entities/Conversation.java
@@ -1057,6 +1057,18 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
}
}
+ public int receivedMessagesCount() {
+ int count = 0;
+ synchronized (this.messages) {
+ for (Message message : messages) {
+ if (message.getStatus() == Message.STATUS_RECEIVED) {
+ ++count;
+ }
+ }
+ }
+ return count;
+ }
+
private int sentMessagesCount() {
int count = 0;
synchronized (this.messages) {