From f08d242ca971d4dc3044ecb9a743c731b89161fe Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Thu, 14 Sep 2023 23:51:58 -0400 Subject: Continue changing vote button icons. --- .../adapters/PostRecyclerViewAdapter.java | 472 +++++++++------------ 1 file changed, 208 insertions(+), 264 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 50f7ff3a..e6439f6b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -102,6 +102,8 @@ import ml.docilealligator.infinityforreddit.databinding.ItemPostCard3TextBinding import ml.docilealligator.infinityforreddit.databinding.ItemPostCard3VideoTypeAutoplayBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostCard3VideoTypeAutoplayLegacyControllerBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostCard3WithPreviewBinding; +import ml.docilealligator.infinityforreddit.databinding.ItemPostCompactBinding; +import ml.docilealligator.infinityforreddit.databinding.ItemPostCompactRightThumbnailBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostGalleryGalleryTypeBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostGalleryTypeBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostTextBinding; @@ -551,9 +553,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter requestListener; Post post; @@ -4017,21 +4020,34 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter { - if (mAccessToken == null) { - Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); - return; - } - int position = getBindingAdapterPosition(); if (position < 0) { return; } Post post = getItem(position); if (post != null) { + if (mAccessToken == null) { + Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); + return; + } + if (mMarkPostsAsReadAfterVoting) { markPostRead(post, true); } @@ -4279,32 +4288,35 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter { - if (mAccessToken == null) { - Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); - return; - } - int position = getBindingAdapterPosition(); if (position < 0) { return; } Post post = getItem(position); if (post != null) { + if (mAccessToken == null) { + Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); + return; + } + if (mMarkPostsAsReadAfterVoting) { markPostRead(post, true); } @@ -4375,32 +4392,34 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter