From 38344e305ce213012723870fdc7bea474baf1083 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sat, 18 Aug 2018 09:35:45 +0800 Subject: Save vote state in CommentData --- .../docilealligator/infinityforreddit/CommentData.java | 9 +++++++++ .../infinityforreddit/CommentRecyclerViewAdapter.java | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentData.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentData.java index 5da40e9a..02bc245d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentData.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentData.java @@ -6,6 +6,7 @@ class CommentData { private String commentTime; private String commentContent; private int score; + private int voteType; private boolean isSubmitter; private String permalink; private int depth; @@ -81,4 +82,12 @@ class CommentData { public boolean isScoreHidden() { return scoreHidden; } + + public int getVoteType() { + return voteType; + } + + public void setVoteType(int voteType) { + this.voteType = voteType; + } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentRecyclerViewAdapter.java index 7de223bb..eef1a004 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentRecyclerViewAdapter.java @@ -42,6 +42,18 @@ class CommentRecyclerViewAdapter extends RecyclerView.Adapter