Set a flag in MessageHeader to indicate whether the message is local.

This commit is contained in:
akwizgran
2014-02-09 15:58:52 +00:00
parent d53c07cb35
commit 9e8bf5b1aa
6 changed files with 68 additions and 57 deletions

View File

@@ -12,11 +12,11 @@ public class MessageHeader {
private final Author.Status authorStatus;
private final String contentType;
private final long timestamp;
private final boolean read;
private final boolean local, read;
public MessageHeader(MessageId id, MessageId parent, GroupId groupId,
Author author, Author.Status authorStatus, String contentType,
long timestamp, boolean read) {
long timestamp, boolean local, boolean read) {
this.id = id;
this.parent = parent;
this.groupId = groupId;
@@ -24,6 +24,7 @@ public class MessageHeader {
this.authorStatus = authorStatus;
this.contentType = contentType;
this.timestamp = timestamp;
this.local = local;
this.read = read;
}
@@ -69,6 +70,11 @@ public class MessageHeader {
return timestamp;
}
/** Returns true if the message was locally generated. */
public boolean isLocal() {
return local;
}
/** Returns true if the message has been read. */
public boolean isRead() {
return read;