From 38d48879014e987723e81dc12faf4397708f3cc8 Mon Sep 17 00:00:00 2001 From: Stypox Date: Sat, 30 Mar 2024 14:46:13 +0100 Subject: [PATCH] Undo some unneeded changes to LocalPlaylistManager --- .../local/playlist/LocalPlaylistManager.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java index 461ac2d0a..dd9307675 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java @@ -133,18 +133,13 @@ public class LocalPlaylistManager { } public Maybe renamePlaylist(final long playlistId, final String name) { - return modifyPlaylist(playlistId, name, THUMBNAIL_ID_LEAVE_UNCHANGED, false, -1); + return modifyPlaylist(playlistId, name, THUMBNAIL_ID_LEAVE_UNCHANGED, false); } public Maybe changePlaylistThumbnail(final long playlistId, final long thumbnailStreamId, final boolean isPermanent) { - return modifyPlaylist(playlistId, null, thumbnailStreamId, isPermanent, -1); - } - - public Maybe updatePlaylistDisplayIndex(final long playlistId, - final long displayIndex) { - return modifyPlaylist(playlistId, null, THUMBNAIL_ID_LEAVE_UNCHANGED, false, displayIndex); + return modifyPlaylist(playlistId, null, thumbnailStreamId, isPermanent); } public long getPlaylistThumbnailStreamId(final long playlistId) { @@ -168,8 +163,7 @@ public class LocalPlaylistManager { private Maybe modifyPlaylist(final long playlistId, @Nullable final String name, final long thumbnailStreamId, - final boolean isPermanent, - final long displayIndex) { + final boolean isPermanent) { return playlistTable.getPlaylist(playlistId) .firstElement() .filter(playlistEntities -> !playlistEntities.isEmpty()) @@ -182,9 +176,6 @@ public class LocalPlaylistManager { playlist.setThumbnailStreamId(thumbnailStreamId); playlist.setIsThumbnailPermanent(isPermanent); } - if (displayIndex != -1) { - playlist.setDisplayIndex(displayIndex); - } return playlistTable.update(playlist); }).subscribeOn(Schedulers.io()); }