Address review comments

This commit is contained in:
Torsten Grote
2017-04-12 09:30:08 -03:00
parent 9bfb58a764
commit 4b955809f7
13 changed files with 60 additions and 43 deletions

View File

@@ -41,8 +41,12 @@ public class BlogCommentHeader extends BlogPostHeader {
}
public BlogPostHeader getParent() {
return parent;
}
public BlogPostHeader getRootPost() {
if (parent instanceof BlogCommentHeader)
return ((BlogCommentHeader) parent).getParent();
return ((BlogCommentHeader) parent).getRootPost();
return parent;
}

View File

@@ -16,18 +16,16 @@ public class Feed {
private final Blog blog;
private final LocalAuthor localAuthor;
@Nullable
private final String title, description, author;
private final String description, author;
private final long added, updated, lastEntryTime;
public Feed(String url, Blog blog, LocalAuthor localAuthor,
@Nullable String title, @Nullable String description,
@Nullable String author, long added, long updated,
long lastEntryTime) {
@Nullable String description, @Nullable String author, long added,
long updated, long lastEntryTime) {
this.url = url;
this.blog = blog;
this.localAuthor = localAuthor;
this.title = title;
this.description = description;
this.author = author;
this.added = added;
@@ -36,13 +34,12 @@ public class Feed {
}
public Feed(String url, Blog blog, LocalAuthor localAuthor,
@Nullable String title, @Nullable String description,
@Nullable String author, long added) {
this(url, blog, localAuthor, title, description, author, added, 0L, 0L);
@Nullable String description, @Nullable String author, long added) {
this(url, blog, localAuthor, description, author, added, 0L, 0L);
}
public Feed(String url, Blog blog, LocalAuthor localAuthor, long added) {
this(url, blog, localAuthor, null, null, null, added, 0L, 0L);
this(url, blog, localAuthor, null, null, added, 0L, 0L);
}
public String getUrl() {
@@ -61,9 +58,8 @@ public class Feed {
return localAuthor;
}
@Nullable
public String getTitle() {
return title;
return blog.getName();
}
@Nullable

View File

@@ -21,7 +21,6 @@ public interface FeedConstants {
String KEY_BLOG_TITLE = "blogTitle";
String KEY_PUBLIC_KEY = "publicKey";
String KEY_PRIVATE_KEY = "privateKey";
String KEY_FEED_TITLE = "feedTitle";
String KEY_FEED_DESC = "feedDesc";
String KEY_FEED_AUTHOR = "feedAuthor";
String KEY_FEED_ADDED = "feedAdded";