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:
Torsten Grote
2016-06-22 16:47:01 -03:00
parent e0d2d09bdd
commit fd7278b488
22 changed files with 568 additions and 71 deletions

View File

@@ -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