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 6af10bf21..088615f9c 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 @@ -362,18 +362,18 @@ public class LocalPlaylistFragment extends BaseLocalListFragment removeWatchedStreams(false)) .setNeutralButton( R.string.remove_watched_popup_yes_and_partially_watched_videos, (DialogInterface d, int id) -> removeWatchedStreams(true)) - .setNegativeButton(R.string.remove_watched_popup_cancel, - (DialogInterface d, int id) -> d.cancel()); - builder.create().show(); + .setNegativeButton(R.string.cancel, + (DialogInterface d, int id) -> d.cancel()) + .create() + .show(); break; default: return super.onOptionsItemSelected(item); @@ -388,22 +388,23 @@ public class LocalPlaylistFragment extends BaseLocalListFragment { - boolean localRemovePartiallyWatched = (boolean) flow.blockingFirst(); - List playlist - = (List) flow.blockingLast(); - HistoryRecordManager recordManager = new HistoryRecordManager(getContext()); + .map((List playlist) -> { + //Playlist data Iterator playlistIter = playlist.iterator(); + + //History data + HistoryRecordManager recordManager = new HistoryRecordManager(getContext()); Iterator historyIter = recordManager .getStreamHistorySortedById().blockingFirst().iterator(); - List notWatchedItems = new ArrayList<>(); Iterator streamStatesIter = null; + + //Remove Watched, Functionality data + List notWatchedItems = new ArrayList<>(); boolean thumbnailVideoRemoved = false; - if (!localRemovePartiallyWatched) { + if (!removePartiallyWatched) { streamStatesIter = recordManager.loadLocalStreamStateBatch(playlist) .blockingGet().iterator(); } @@ -414,7 +415,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragmentRemove watched Remove watched videos? "Videos that have been watched\nbefore and after being added to the playlist will be removed.\nAre you sure? This cannot be undone! - Yes - Cancel Yes, and partially watched videos Due to ExoPlayer constraints the seek duration was set to %d seconds