From 914feef5e97162a62bfa234e25a030bea9481c45 Mon Sep 17 00:00:00 2001 From: "Yevhen Babiichuk (DustDFG)" Date: Mon, 12 Jan 2026 20:35:14 +0200 Subject: [PATCH] Fix playlist item dragging video to only neighbor positions Call `saveImmediate` only after used actually dropped item instead of every time View is updated which happens several times to show user a feedback where item would be moved --- .../newpipe/local/playlist/LocalPlaylistFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 1efc0a84ce4..d841b44b4b6 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -768,11 +768,17 @@ public boolean onMove(@NonNull final RecyclerView recyclerView, final boolean isSwapped = itemListAdapter.swapItems(sourceIndex, targetIndex); if (isSwapped) { debounceSaver.setHasChangesToSave(); - saveImmediate(); } return isSwapped; } + @Override + public void clearView(@NonNull final RecyclerView recyclerView, + @NonNull final RecyclerView.ViewHolder viewHolder) { + super.clearView(recyclerView, viewHolder); + saveImmediate(); + } + @Override public boolean isLongPressDragEnabled() { return false;