diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-09-09 03:17:58 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-09-09 03:17:58 +0000 |
commit | 3bb5e83d2e300e9b37c999f65c56195c5351df51 (patch) | |
tree | d05eb4a7d0af17ffbc29f57a3982950ad547a243 /app | |
parent | 313eb77ddc97bdd2f96a2a221d397819308f1851 (diff) | |
download | infinity-for-reddit-3bb5e83d2e300e9b37c999f65c56195c5351df51.tar infinity-for-reddit-3bb5e83d2e300e9b37c999f65c56195c5351df51.tar.gz infinity-for-reddit-3bb5e83d2e300e9b37c999f65c56195c5351df51.tar.bz2 infinity-for-reddit-3bb5e83d2e300e9b37c999f65c56195c5351df51.tar.lz infinity-for-reddit-3bb5e83d2e300e9b37c999f65c56195c5351df51.tar.xz infinity-for-reddit-3bb5e83d2e300e9b37c999f65c56195c5351df51.tar.zst infinity-for-reddit-3bb5e83d2e300e9b37c999f65c56195c5351df51.zip |
Fixed displaying wrong score.
Diffstat (limited to '')
3 files changed, 2 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java index 273b52ce..fc6619a3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java @@ -521,7 +521,7 @@ class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVie ((CommentViewHolder) holder).commentTimeTextView.setText(comment.getCommentTime()); mMarkwon.setMarkdown(((CommentViewHolder) holder).commentMarkdownView, comment.getCommentContent()); - ((CommentViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore())); + ((CommentViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore() + comment.getVoteType())); ViewGroup.LayoutParams params = ((CommentViewHolder) holder).verticalBlock.getLayoutParams(); params.width = comment.getDepth() * 16; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingRecyclerViewAdapter.java index e65bc536..3b39ace5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingRecyclerViewAdapter.java @@ -133,7 +133,7 @@ class CommentsListingRecyclerViewAdapter extends PagedListAdapter<CommentData, R mMarkwon.setMarkdown(((DataViewHolder) holder).commentMarkdownView, comment.getCommentContent()); - ((DataViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore())); + ((DataViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore() + comment.getVoteType())); switch (comment.getVoteType()) { case 1: diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java index 232386ec..2cc01113 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java @@ -1,7 +1,6 @@ package ml.docilealligator.infinityforreddit; import android.os.AsyncTask; -import android.util.Log; import androidx.annotation.NonNull; @@ -69,14 +68,12 @@ class SubredditSubscription { } subredditSubscriptionListener.onSubredditSubscriptionSuccess(); } else { - Log.i("call failed", response.message()); subredditSubscriptionListener.onSubredditSubscriptionFail(); } } @Override public void onFailure(@NonNull Call<String> call, @NonNull Throwable t) { - Log.i("call failed", t.getMessage()); subredditSubscriptionListener.onSubredditSubscriptionFail(); } }); |