mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Combined Blog Feed
This commit addes a combined blog feed that shows all posts of all subscribed blogs in the order the blog posts have been received. For now, this commit also hides other blog functionality like adding additional blogs and browsing individual blogs. Closes #417
This commit is contained in:
@@ -36,6 +36,10 @@ class BlogPostItem implements Comparable<BlogPostItem> {
|
||||
return header.getTimestamp();
|
||||
}
|
||||
|
||||
public long getTimeReceived() {
|
||||
return header.getTimeReceived();
|
||||
}
|
||||
|
||||
public Author getAuthor() {
|
||||
return header.getAuthor();
|
||||
}
|
||||
@@ -56,7 +60,7 @@ class BlogPostItem implements Comparable<BlogPostItem> {
|
||||
public int compareTo(@NonNull BlogPostItem other) {
|
||||
if (this == other) return 0;
|
||||
// The blog with the newest message comes first
|
||||
long aTime = getTimestamp(), bTime = other.getTimestamp();
|
||||
long aTime = getTimeReceived(), bTime = other.getTimeReceived();
|
||||
if (aTime > bTime) return -1;
|
||||
if (aTime < bTime) return 1;
|
||||
// Break ties by post title
|
||||
|
||||
Reference in New Issue
Block a user