Skip to content

Commit

Permalink
Improvements to DN comment replying.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbutcher committed Nov 27, 2015
1 parent 1e08fa9 commit b02346d
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,76 @@ public Comment(long id,
this.comments = comments;
}

public static class Builder {
private long id;
private String body;
private String body_html;
private Date created_at;
private int depth;
private int vote_count;
private long user_id;
private String user_display_name;
private String user_portrait_url;
private String user_job;

public Builder setId(long id) {
this.id = id;
return this;
}

public Builder setBody(String body) {
this.body = body;
return this;
}

public Builder setBodyHtml(String body_html) {
this.body_html = body_html;
return this;
}

public Builder setCreatedAt(Date created_at) {
this.created_at = created_at;
return this;
}

public Builder setDepth(int depth) {
this.depth = depth;
return this;
}

public Builder setVoteCount(int vote_count) {
this.vote_count = vote_count;
return this;
}

public Builder setUserId(long user_id) {
this.user_id = user_id;
return this;
}

public Builder setUserDisplayName(String user_display_name) {
this.user_display_name = user_display_name;
return this;
}

public Builder setUserPortraitUrl(String user_portrait_url) {
this.user_portrait_url = user_portrait_url;
return this;
}

public Builder setUserJob(String user_job) {
this.user_job = user_job;
return this;
}

public Comment build() {
return new Comment(id, body, body_html, created_at, depth, vote_count, user_id,
user_display_name, user_portrait_url, user_job, null);
}
}

/* parcelable */

protected Comment(Parcel in) {
id = in.readLong();
body = in.readString();
Expand Down
Loading

0 comments on commit b02346d

Please sign in to comment.