-Fixed toast exception on playlist creation.
This commit is contained in:
parent
ab42e363d4
commit
1126033952
1 changed files with 4 additions and 3 deletions
|
|
@ -78,12 +78,13 @@ public class PlaylistCreationDialog extends DialogFragment {
|
||||||
new LocalPlaylistManager(NewPipeDatabase.getInstance(getContext()));
|
new LocalPlaylistManager(NewPipeDatabase.getInstance(getContext()));
|
||||||
final List<StreamEntity> streams =
|
final List<StreamEntity> streams =
|
||||||
Collections.singletonList(new StreamEntity(streamInfo));
|
Collections.singletonList(new StreamEntity(streamInfo));
|
||||||
|
final Toast successToast = Toast.makeText(getActivity(),
|
||||||
|
"Playlist " + name + " successfully created",
|
||||||
|
Toast.LENGTH_SHORT);
|
||||||
|
|
||||||
playlistManager.createPlaylist(name, streams)
|
playlistManager.createPlaylist(name, streams)
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(longs -> Toast.makeText(getActivity(),
|
.subscribe(longs -> successToast.show());
|
||||||
"Playlist " + name + " successfully created",
|
|
||||||
Toast.LENGTH_SHORT).show());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return dialogBuilder.create();
|
return dialogBuilder.create();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue