aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/entities
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-11 15:34:24 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-11 15:34:24 +0100
commitf6a6982bd0232fed847d4d32103a999aa6f94cd5 (patch)
tree8ef7c15227cd93f41652b550f243882737143dd1 /src/de/gultsch/chat/entities
parent962263e6e65b327cca64a443649f3490b0df3a31 (diff)
conference histories are now working. only the actually needed history is queried
Diffstat (limited to 'src/de/gultsch/chat/entities')
-rw-r--r--src/de/gultsch/chat/entities/Conversation.java2
-rw-r--r--src/de/gultsch/chat/entities/Message.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/de/gultsch/chat/entities/Conversation.java b/src/de/gultsch/chat/entities/Conversation.java
index bddd1356..e0e5623c 100644
--- a/src/de/gultsch/chat/entities/Conversation.java
+++ b/src/de/gultsch/chat/entities/Conversation.java
@@ -73,7 +73,7 @@ public class Conversation extends AbstractEntity {
}
public boolean isRead() {
- if (this.messages == null) return true;
+ if ((this.messages == null)||(this.messages.size() == 0)) return true;
return this.messages.get(this.messages.size() - 1).isRead();
}
diff --git a/src/de/gultsch/chat/entities/Message.java b/src/de/gultsch/chat/entities/Message.java
index d53e93c1..a168c645 100644
--- a/src/de/gultsch/chat/entities/Message.java
+++ b/src/de/gultsch/chat/entities/Message.java
@@ -127,5 +127,9 @@ public class Message extends AbstractEntity {
public void markUnread() {
this.read = false;
}
+
+ public void setTime(long time) {
+ this.timeSent = time;
+ }
}