Store and expose time a blog post was received

This is useful when sorting blog posts in the combined feed. It ensures
you do not miss older posts that were just synced to you.
This commit is contained in:
Torsten Grote
2016-06-22 12:27:58 -03:00
parent a8f51fcb8a
commit 91aa81041e
4 changed files with 15 additions and 3 deletions

View File

@@ -11,18 +11,25 @@ public class BlogPostHeader extends PostHeader {
@Nullable
private final String title;
private final long timeReceived;
public BlogPostHeader(@Nullable String title, @NotNull MessageId id,
@Nullable MessageId parentId, long timestamp,
@Nullable MessageId parentId, long timestamp, long timeReceived,
@NotNull Author author, @NotNull Status authorStatus,
@NotNull String contentType, boolean read) {
super(id, parentId, timestamp, author, authorStatus, contentType, read);
this.title = title;
this.timeReceived = timeReceived;
}
@Nullable
public String getTitle() {
return title;
}
public long getTimeReceived() {
return timeReceived;
}
}