From 24b33bb05ddb90ed7c0fcd654d6e7b1add50819d Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Fri, 23 Dec 2022 22:11:34 -0800 Subject: Fix ItemTouchHelper issue? --- .../infinityforreddit/fragments/CommentsListingFragment.java | 3 --- .../infinityforreddit/fragments/HistoryPostFragment.java | 3 --- .../ml/docilealligator/infinityforreddit/fragments/PostFragment.java | 4 ---- .../infinityforreddit/fragments/ViewPostDetailFragment.java | 3 --- 4 files changed, 13 deletions(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/CommentsListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/CommentsListingFragment.java index feb811aa..1d6c7d36 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/CommentsListingFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/CommentsListingFragment.java @@ -180,9 +180,6 @@ public class CommentsListingFragment extends Fragment implements FragmentCommuni exceedThreshold = false; touchHelper.attachToRecyclerView(null); touchHelper.attachToRecyclerView(mCommentRecyclerView); - if (mAdapter != null) { - mAdapter.onItemSwipe(viewHolder, direction, swipeLeftAction, swipeRightAction); - } } } 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 dcdda517..e85e2b2a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java @@ -496,9 +496,6 @@ public class HistoryPostFragment extends Fragment implements FragmentCommunicato exceedThreshold = false; touchHelper.attachToRecyclerView(null); touchHelper.attachToRecyclerView(mPostRecyclerView); - if (mAdapter != null) { - mAdapter.onItemSwipe(viewHolder, direction, swipeLeftAction, swipeRightAction); - } } } 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 af2d68e0..d41894a3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java @@ -16,7 +16,6 @@ import android.os.Build; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Handler; -import android.util.Log; import android.view.HapticFeedbackConstants; import android.view.KeyEvent; import android.view.LayoutInflater; @@ -1087,9 +1086,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator { exceedThreshold = false; touchHelper.attachToRecyclerView(null); touchHelper.attachToRecyclerView(mPostRecyclerView); - if (mAdapter != null) { - mAdapter.onItemSwipe(viewHolder, direction, swipeLeftAction, swipeRightAction); - } } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java index 02e2bdd4..ee058b57 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java @@ -459,9 +459,6 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic exceedThreshold = false; touchHelper.attachToRecyclerView(null); touchHelper.attachToRecyclerView((mCommentsRecyclerView == null ? mRecyclerView : mCommentsRecyclerView)); - if (mCommentsAdapter != null) { - mCommentsAdapter.onItemSwipe(viewHolder, direction, swipeLeftAction, swipeRightAction); - } } } -- cgit v1.2.3