From 7c6ee5beba83522ad49b54a3fdfdf6d03de107ba Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Mon, 23 Oct 2023 00:29:08 -0400 Subject: Center the score of a post. Switch the number of comment and the share button back. --- .../adapters/HistoryPostRecyclerViewAdapter.java | 260 +++++++++++---------- .../adapters/PostDetailRecyclerViewAdapter.java | 106 ++++----- .../adapters/PostRecyclerViewAdapter.java | 247 +++++++++++--------- 3 files changed, 334 insertions(+), 279 deletions(-) (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java index 680ba84a..bf1c24c9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java @@ -51,7 +51,6 @@ import com.google.android.exoplayer2.ui.DefaultTimeBar; import com.google.android.exoplayer2.ui.PlayerView; import com.google.android.exoplayer2.ui.TimeBar; import com.google.android.material.button.MaterialButton; -import com.google.android.material.button.MaterialButtonToggleGroup; import com.google.common.collect.ImmutableList; import com.libRG.CustomTextView; @@ -696,9 +695,9 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter { + upvoteButton.performClick(); + }); + downvoteButton.setOnClickListener(view -> { int position = getBindingAdapterPosition(); if (position < 0) { @@ -2943,6 +2954,7 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter { + upvoteButton.performClick(); + }); + downvoteButton.setOnClickListener(view -> { int position = getBindingAdapterPosition(); if (position < 0) { @@ -5615,13 +5645,13 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter { + upvoteButton.performClick(); + }); + downvoteButton.setOnClickListener(view -> { if (mPost.isArchived()) { Toast.makeText(mActivity, R.string.archived_post_vote_unavailable, Toast.LENGTH_SHORT).show(); @@ -1299,13 +1306,13 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter fetchGfycatOrStreamableVideoCall; - AspectRatioGifImageView mIconGifImageView; - TextView mSubredditTextView; - TextView mUserTextView; - TextView mAuthorFlairTextView; - TextView mPostTimeTextView; - TextView mTitleTextView; - CustomTextView mTypeTextView; - ImageView mCrosspostImageView; - ImageView mArchivedImageView; - ImageView mLockedImageView; - CustomTextView mNSFWTextView; - CustomTextView mSpoilerTextView; - CustomTextView mFlairTextView; - TextView mAwardsTextView; - TextView mUpvoteRatioTextView; AspectRatioFrameLayout aspectRatioFrameLayout; PlayerView playerView; GifImageView previewImageView; @@ -1573,13 +1572,6 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter { + upvoteButton.performClick(); + }); + downvoteButton.setOnClickListener(view -> { int position = getBindingAdapterPosition(); if (position < 0) { @@ -3077,13 +3091,13 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter