From 02f43598c2345ce4ba676d6ce9cb3dfc6b948e66 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:40:24 -0400 Subject: Enable swipe action for card layout 3. --- .../infinityforreddit/fragments/HistoryPostFragment.java | 3 ++- .../ml/docilealligator/infinityforreddit/fragments/PostFragment.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java index f6f5391f..478a3e56 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java @@ -441,7 +441,8 @@ public class HistoryPostFragment extends Fragment implements FragmentCommunicato @Override public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { if (!(viewHolder instanceof HistoryPostRecyclerViewAdapter.PostBaseViewHolder) && - !(viewHolder instanceof HistoryPostRecyclerViewAdapter.PostCompactBaseViewHolder)) { + !(viewHolder instanceof HistoryPostRecyclerViewAdapter.PostCompactBaseViewHolder) && + !(viewHolder instanceof HistoryPostRecyclerViewAdapter.PostMaterial3CardBaseViewHolder)) { return makeMovementFlags(0, 0); } else if (viewHolder instanceof HistoryPostRecyclerViewAdapter.PostBaseGalleryTypeViewHolder) { if (((HistoryPostRecyclerViewAdapter.PostBaseGalleryTypeViewHolder) viewHolder).isSwipeLocked()) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java index e4850443..c61fba65 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java @@ -1036,7 +1036,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { @Override public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { if (!(viewHolder instanceof PostRecyclerViewAdapter.PostBaseViewHolder) && - !(viewHolder instanceof PostRecyclerViewAdapter.PostCompactBaseViewHolder)) { + !(viewHolder instanceof PostRecyclerViewAdapter.PostCompactBaseViewHolder) && + !(viewHolder instanceof PostRecyclerViewAdapter.PostMaterial3CardBaseViewHolder)) { return makeMovementFlags(0, 0); } else if (viewHolder instanceof PostRecyclerViewAdapter.PostBaseGalleryTypeViewHolder) { if (((PostRecyclerViewAdapter.PostBaseGalleryTypeViewHolder) viewHolder).isSwipeLocked()) { -- cgit v1.2.3