From b50b5a1e9ab2f27771927e3d5b86123b92241d46 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Mon, 23 Oct 2023 12:51:01 -0400 Subject: Center the score of a comment. Switch the number of comment and the share button back on a comment. --- .../CommentsListingRecyclerViewAdapter.java | 61 ++++++++++------ .../adapters/CommentsRecyclerViewAdapter.java | 67 ++++++++++------- app/src/main/res/layout/item_comment.xml | 85 ++++++++++++---------- 3 files changed, 127 insertions(+), 86 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java index 411a8af0..a3b5b5db 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java @@ -25,7 +25,6 @@ import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.button.MaterialButton; -import com.google.android.material.button.MaterialButtonToggleGroup; import java.util.Locale; @@ -226,17 +225,18 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter { + upvoteButton.performClick(); + }); + downvoteButton.setOnClickListener(view -> { if (mAccessToken == null) { Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); @@ -624,7 +637,6 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter { + upvoteButton.performClick(); + }); + downvoteButton.setOnClickListener(view -> { if (mPost.isArchived()) { Toast.makeText(mActivity, R.string.archived_post_vote_unavailable, Toast.LENGTH_SHORT).show(); @@ -1491,7 +1504,6 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter - - - + app:layout_constraintTop_toTopOf="parent" /> - + - +