detail: allow adding to playlist in playlist
The playback view can still add to a playlist from a playlist, so I have to implement this navigation route no matter what.
This commit is contained in:
parent
a99b0ff615
commit
52697ef891
2 changed files with 8 additions and 1 deletions
|
@ -328,7 +328,11 @@ class PlaylistDetailFragment :
|
||||||
logD("Deleting ${decision.playlist}")
|
logD("Deleting ${decision.playlist}")
|
||||||
PlaylistDetailFragmentDirections.deletePlaylist(decision.playlist.uid)
|
PlaylistDetailFragmentDirections.deletePlaylist(decision.playlist.uid)
|
||||||
}
|
}
|
||||||
is PlaylistDecision.Add,
|
is PlaylistDecision.Add -> {
|
||||||
|
logD("Adding ${decision.songs.size} songs to a playlist")
|
||||||
|
PlaylistDetailFragmentDirections.addToPlaylist(
|
||||||
|
decision.songs.map { it.uid }.toTypedArray())
|
||||||
|
}
|
||||||
is PlaylistDecision.New -> error("Unexpected playlist decision $decision")
|
is PlaylistDecision.New -> error("Unexpected playlist decision $decision")
|
||||||
}
|
}
|
||||||
findNavController().navigateSafe(directions)
|
findNavController().navigateSafe(directions)
|
||||||
|
|
|
@ -379,6 +379,9 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/delete_playlist"
|
android:id="@+id/delete_playlist"
|
||||||
app:destination="@id/delete_playlist_dialog" />
|
app:destination="@id/delete_playlist_dialog" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/add_to_playlist"
|
||||||
|
app:destination="@id/add_to_playlist_dialog" />
|
||||||
<action
|
<action
|
||||||
android:id="@+id/play_from_artist"
|
android:id="@+id/play_from_artist"
|
||||||
app:destination="@id/play_from_artist_dialog" />
|
app:destination="@id/play_from_artist_dialog" />
|
||||||
|
|
Loading…
Reference in a new issue