mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Set a flag in MessageHeader to indicate whether the message is local.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user