Show Personal Blog When Clicking On Post in Combined Blog Feed

Closes #415
This commit is contained in:
Torsten Grote
2016-07-28 16:53:25 -03:00
committed by akwizgran
parent 32578e2cab
commit bca12bb0e5
9 changed files with 55 additions and 30 deletions

View File

@@ -5,16 +5,19 @@ import android.support.annotation.NonNull;
import org.briarproject.api.blogs.BlogPostHeader;
import org.briarproject.api.identity.Author;
import org.briarproject.api.identity.Author.Status;
import org.briarproject.api.sync.GroupId;
import org.briarproject.api.sync.MessageId;
// This class is not thread-safe
class BlogPostItem implements Comparable<BlogPostItem> {
private final GroupId groupId;
private final BlogPostHeader header;
private final byte[] body;
private boolean read;
BlogPostItem(BlogPostHeader header, byte[] body) {
BlogPostItem(GroupId groupId, BlogPostHeader header, byte[] body) {
this.groupId = groupId;
this.header = header;
this.body = body;
read = header.isRead();
@@ -24,6 +27,10 @@ class BlogPostItem implements Comparable<BlogPostItem> {
return header.getId();
}
public GroupId getGroupId() {
return groupId;
}
public String getTitle() {
return header.getTitle();
}