mirror of
https://github.com/gabehf/tempus.git
synced 2026-03-17 03:06:31 -07:00
Change PlaylistChooserDialog\PlaylistEditorDialog to require ArrayList of Songs
This allows for being able to provide an entire Album's worth of songs in one API call.
This commit is contained in:
parent
9cf62c8c0c
commit
bfdeb0658b
5 changed files with 25 additions and 20 deletions
|
|
@ -39,6 +39,9 @@ import com.cappielloantonio.tempo.viewmodel.SongBottomSheetViewModel;
|
|||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
@UnstableApi
|
||||
public class SongBottomSheetDialog extends BottomSheetDialogFragment implements View.OnClickListener {
|
||||
private HomeViewModel homeViewModel;
|
||||
|
|
@ -177,7 +180,7 @@ public class SongBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||
TextView addToPlaylist = view.findViewById(R.id.add_to_playlist_text_view);
|
||||
addToPlaylist.setOnClickListener(v -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable(Constants.TRACK_OBJECT, song);
|
||||
bundle.putParcelableArrayList(Constants.TRACKS_OBJECT, new ArrayList<>(Collections.singletonList(song)));
|
||||
|
||||
PlaylistChooserDialog dialog = new PlaylistChooserDialog();
|
||||
dialog.setArguments(bundle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue