mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Don't add threaded messages to the UI before their parents.
This commit is contained in:
@@ -21,6 +21,8 @@ public interface MessageTree<T extends MessageTree.MessageNode> {
|
||||
|
||||
Collection<T> depthFirstOrder();
|
||||
|
||||
boolean contains(MessageId m);
|
||||
|
||||
@NotNullByDefault
|
||||
interface MessageNode {
|
||||
|
||||
|
||||
@@ -14,21 +14,26 @@ import javax.annotation.concurrent.Immutable;
|
||||
@NotNullByDefault
|
||||
public class ForumPostReceivedEvent extends Event {
|
||||
|
||||
private final ForumPostHeader forumPostHeader;
|
||||
private final GroupId groupId;
|
||||
private final ForumPostHeader header;
|
||||
private final String body;
|
||||
|
||||
public ForumPostReceivedEvent(ForumPostHeader forumPostHeader,
|
||||
GroupId groupId) {
|
||||
|
||||
this.forumPostHeader = forumPostHeader;
|
||||
public ForumPostReceivedEvent(GroupId groupId, ForumPostHeader header,
|
||||
String body) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public ForumPostHeader getForumPostHeader() {
|
||||
return forumPostHeader;
|
||||
this.header = header;
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
public GroupId getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public ForumPostHeader getHeader() {
|
||||
return header;
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
return body;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,14 @@ public class GroupMessageAddedEvent extends Event {
|
||||
|
||||
private final GroupId groupId;
|
||||
private final GroupMessageHeader header;
|
||||
private final String body;
|
||||
private final boolean local;
|
||||
|
||||
public GroupMessageAddedEvent(GroupId groupId, GroupMessageHeader header,
|
||||
boolean local) {
|
||||
|
||||
String body, boolean local) {
|
||||
this.groupId = groupId;
|
||||
this.header = header;
|
||||
this.body = body;
|
||||
this.local = local;
|
||||
}
|
||||
|
||||
@@ -35,6 +36,10 @@ public class GroupMessageAddedEvent extends Event {
|
||||
return header;
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public boolean isLocal() {
|
||||
return local;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user