mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
ForumManager: Added parent id to metadata and a unit test
This commit is contained in:
committed by
Torsten Grote
parent
2a7990f5c4
commit
21b237a629
@@ -49,4 +49,15 @@ public interface ForumConstants {
|
||||
int TASK_UNSHARE_FORUM_SHARED_BY_US = 6;
|
||||
int TASK_UNSHARE_FORUM_SHARED_WITH_US = 7;
|
||||
|
||||
// Database keys
|
||||
String KEY_TIMESTAMP = "timestamp";
|
||||
String KEY_PARENT = "parent";
|
||||
String KEY_ID = "id";
|
||||
String KEY_NAME = "name";
|
||||
String KEY_PUBLIC_NAME = "publicKey";
|
||||
String KEY_AUTHOR = "author";
|
||||
String KEY_CONTENT_TYPE = "contentType";
|
||||
String KEY_LOCAL = "local";
|
||||
String KEY_READ = "read";
|
||||
|
||||
}
|
||||
|
||||
@@ -6,15 +6,18 @@ import org.briarproject.api.sync.MessageId;
|
||||
public class ForumPostHeader {
|
||||
|
||||
private final MessageId id;
|
||||
private final MessageId parentId;
|
||||
private final long timestamp;
|
||||
private final Author author;
|
||||
private final Author.Status authorStatus;
|
||||
private final String contentType;
|
||||
private final boolean read;
|
||||
|
||||
public ForumPostHeader(MessageId id, long timestamp, Author author,
|
||||
Author.Status authorStatus, String contentType, boolean read) {
|
||||
public ForumPostHeader(MessageId id, MessageId parentId, long timestamp,
|
||||
Author author, Author.Status authorStatus, String contentType,
|
||||
boolean read) {
|
||||
this.id = id;
|
||||
this.parentId = parentId;
|
||||
this.timestamp = timestamp;
|
||||
this.author = author;
|
||||
this.authorStatus = authorStatus;
|
||||
@@ -45,4 +48,8 @@ public class ForumPostHeader {
|
||||
public boolean isRead() {
|
||||
return read;
|
||||
}
|
||||
|
||||
public MessageId getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user