kopia lustrzana https://github.com/TeamNewPipe/NewPipe
-Fixed playlist creation icon in playlist append dialog.
-Fixed bookmarking disposable not part of playlist fragment lifecycle. -Rearranged local fragment directory structure.pull/1004/head
rodzic
c5ec8d04c1
commit
d0808ce159
|
@ -58,7 +58,7 @@ import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
|||
import org.schabi.newpipe.extractor.stream.VideoStream;
|
||||
import org.schabi.newpipe.fragments.BackPressable;
|
||||
import org.schabi.newpipe.fragments.BaseStateFragment;
|
||||
import org.schabi.newpipe.fragments.local.PlaylistAppendDialog;
|
||||
import org.schabi.newpipe.fragments.local.dialog.PlaylistAppendDialog;
|
||||
import org.schabi.newpipe.info_list.InfoItemBuilder;
|
||||
import org.schabi.newpipe.info_list.InfoItemDialog;
|
||||
import org.schabi.newpipe.player.MainVideoPlayer;
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
|
|||
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
||||
import org.schabi.newpipe.fragments.BaseStateFragment;
|
||||
import org.schabi.newpipe.fragments.OnScrollBelowItemsListener;
|
||||
import org.schabi.newpipe.fragments.local.PlaylistAppendDialog;
|
||||
import org.schabi.newpipe.fragments.local.dialog.PlaylistAppendDialog;
|
||||
import org.schabi.newpipe.info_list.InfoItemDialog;
|
||||
import org.schabi.newpipe.info_list.InfoListAdapter;
|
||||
import org.schabi.newpipe.playlist.SinglePlayQueue;
|
||||
|
@ -28,7 +28,6 @@ import org.schabi.newpipe.util.NavigationHelper;
|
|||
import org.schabi.newpipe.util.OnClickGesture;
|
||||
import org.schabi.newpipe.util.StateSaver;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
|
|
|
@ -42,6 +42,7 @@ import java.util.List;
|
|||
import io.reactivex.Single;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
|
@ -371,9 +372,10 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
|
|||
playlistBookmarkButton.setVisible(false);
|
||||
playlistUnbookmarkButton.setVisible(false);
|
||||
|
||||
remotePlaylistManager.onBookmark(currentInfo)
|
||||
final Disposable disposable = remotePlaylistManager.onBookmark(currentInfo)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(ignored -> {/* Do nothing */}, this::onError);
|
||||
disposables.add(disposable);
|
||||
}
|
||||
|
||||
private void unbookmarkPlaylist() {
|
||||
|
@ -382,10 +384,11 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
|
|||
playlistBookmarkButton.setVisible(false);
|
||||
playlistUnbookmarkButton.setVisible(false);
|
||||
|
||||
remotePlaylistManager.deletePlaylist(playlistEntity.getUid())
|
||||
final Disposable disposable = remotePlaylistManager.deletePlaylist(playlistEntity.getUid())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.doFinally(() -> playlistEntity = null)
|
||||
.subscribe(ignored -> {/* Do nothing */}, this::onError);
|
||||
disposables.add(disposable);
|
||||
}
|
||||
|
||||
private void updateBookmarkButtonsVisibility() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.schabi.newpipe.fragments.local;
|
||||
package org.schabi.newpipe.fragments.local.bookmark;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
@ -13,6 +13,7 @@ import android.view.View;
|
|||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.fragments.BaseStateFragment;
|
||||
import org.schabi.newpipe.fragments.list.ListViewContract;
|
||||
import org.schabi.newpipe.fragments.local.LocalItemListAdapter;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
|
@ -19,7 +19,6 @@ import org.schabi.newpipe.database.LocalItem;
|
|||
import org.schabi.newpipe.database.playlist.PlaylistLocalItem;
|
||||
import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry;
|
||||
import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity;
|
||||
import org.schabi.newpipe.fragments.local.BaseLocalListFragment;
|
||||
import org.schabi.newpipe.fragments.local.LocalPlaylistManager;
|
||||
import org.schabi.newpipe.fragments.local.RemotePlaylistManager;
|
||||
import org.schabi.newpipe.report.UserAction;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.schabi.newpipe.fragments.local;
|
||||
package org.schabi.newpipe.fragments.local.bookmark;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
@ -26,6 +26,7 @@ import org.schabi.newpipe.R;
|
|||
import org.schabi.newpipe.database.LocalItem;
|
||||
import org.schabi.newpipe.database.playlist.PlaylistStreamEntry;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
||||
import org.schabi.newpipe.fragments.local.LocalPlaylistManager;
|
||||
import org.schabi.newpipe.info_list.InfoItemDialog;
|
||||
import org.schabi.newpipe.playlist.PlayQueue;
|
||||
import org.schabi.newpipe.playlist.SinglePlayQueue;
|
|
@ -17,7 +17,6 @@ import org.schabi.newpipe.R;
|
|||
import org.schabi.newpipe.database.LocalItem;
|
||||
import org.schabi.newpipe.database.stream.StreamStatisticsEntry;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
||||
import org.schabi.newpipe.fragments.local.BaseLocalListFragment;
|
||||
import org.schabi.newpipe.history.HistoryRecordManager;
|
||||
import org.schabi.newpipe.info_list.InfoItemDialog;
|
||||
import org.schabi.newpipe.playlist.PlayQueue;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.schabi.newpipe.fragments.local;
|
||||
package org.schabi.newpipe.fragments.local.dialog;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
|
@ -18,6 +18,8 @@ import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry;
|
|||
import org.schabi.newpipe.database.stream.model.StreamEntity;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
||||
import org.schabi.newpipe.fragments.local.LocalItemListAdapter;
|
||||
import org.schabi.newpipe.fragments.local.LocalPlaylistManager;
|
||||
import org.schabi.newpipe.playlist.PlayQueueItem;
|
||||
import org.schabi.newpipe.util.OnClickGesture;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.schabi.newpipe.fragments.local;
|
||||
package org.schabi.newpipe.fragments.local.dialog;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
|
@ -12,6 +12,7 @@ import android.widget.Toast;
|
|||
import org.schabi.newpipe.NewPipeDatabase;
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.database.stream.model.StreamEntity;
|
||||
import org.schabi.newpipe.fragments.local.LocalPlaylistManager;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.schabi.newpipe.fragments.local;
|
||||
package org.schabi.newpipe.fragments.local.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
|
@ -29,7 +29,7 @@ import com.google.android.exoplayer2.Player;
|
|||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
||||
import org.schabi.newpipe.fragments.OnScrollBelowItemsListener;
|
||||
import org.schabi.newpipe.fragments.local.PlaylistAppendDialog;
|
||||
import org.schabi.newpipe.fragments.local.dialog.PlaylistAppendDialog;
|
||||
import org.schabi.newpipe.player.event.PlayerEventListener;
|
||||
import org.schabi.newpipe.playlist.PlayQueueItem;
|
||||
import org.schabi.newpipe.playlist.PlayQueueItemBuilder;
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.schabi.newpipe.fragments.list.feed.FeedFragment;
|
|||
import org.schabi.newpipe.fragments.list.kiosk.KioskFragment;
|
||||
import org.schabi.newpipe.fragments.list.playlist.PlaylistFragment;
|
||||
import org.schabi.newpipe.fragments.list.search.SearchFragment;
|
||||
import org.schabi.newpipe.fragments.local.LocalPlaylistFragment;
|
||||
import org.schabi.newpipe.fragments.local.bookmark.LocalPlaylistFragment;
|
||||
import org.schabi.newpipe.fragments.local.bookmark.MostPlayedFragment;
|
||||
import org.schabi.newpipe.fragments.local.bookmark.LastPlayedFragment;
|
||||
import org.schabi.newpipe.history.HistoryActivity;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:src="?attr/palette"
|
||||
android:src="?attr/ic_playlist_add"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
|
||||
<TextView
|
||||
|
|
Ładowanie…
Reference in New Issue