mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-04 17:16:24 +00:00
-Fixed toast exception on playlist creation.
This commit is contained in:
parent
9bd26798b6
commit
168ac91ab8
@ -78,12 +78,13 @@ public class PlaylistCreationDialog extends DialogFragment {
|
||||
new LocalPlaylistManager(NewPipeDatabase.getInstance(getContext()));
|
||||
final List<StreamEntity> streams =
|
||||
Collections.singletonList(new StreamEntity(streamInfo));
|
||||
final Toast successToast = Toast.makeText(getActivity(),
|
||||
"Playlist " + name + " successfully created",
|
||||
Toast.LENGTH_SHORT);
|
||||
|
||||
playlistManager.createPlaylist(name, streams)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(longs -> Toast.makeText(getActivity(),
|
||||
"Playlist " + name + " successfully created",
|
||||
Toast.LENGTH_SHORT).show());
|
||||
.subscribe(longs -> successToast.show());
|
||||
});
|
||||
|
||||
return dialogBuilder.create();
|
||||
|
Loading…
Reference in New Issue
Block a user