detail: fix crash on multi-artist navigation
Caused by an unimplemented navigation branch in ArtistDetailFragment.
This commit is contained in:
parent
58989f8568
commit
d297c10b0a
3 changed files with 14 additions and 3 deletions
|
@ -221,8 +221,16 @@ class ArtistDetailFragment :
|
||||||
.navigateSafe(ArtistDetailFragmentDirections.showArtist(show.artist.uid))
|
.navigateSafe(ArtistDetailFragmentDirections.showArtist(show.artist.uid))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is Show.SongArtistDecision,
|
is Show.SongArtistDecision -> {
|
||||||
is Show.AlbumArtistDecision,
|
logD("Navigating to artist choices for ${show.song}")
|
||||||
|
findNavController()
|
||||||
|
.navigateSafe(ArtistDetailFragmentDirections.showArtistChoices(show.song.uid))
|
||||||
|
}
|
||||||
|
is Show.AlbumArtistDecision -> {
|
||||||
|
logD("Navigating to artist choices for ${show.album}")
|
||||||
|
findNavController()
|
||||||
|
.navigateSafe(ArtistDetailFragmentDirections.showArtistChoices(show.album.uid))
|
||||||
|
}
|
||||||
is Show.GenreDetails,
|
is Show.GenreDetails,
|
||||||
is Show.PlaylistDetails -> {
|
is Show.PlaylistDetails -> {
|
||||||
error("Unexpected show command $show")
|
error("Unexpected show command $show")
|
||||||
|
|
|
@ -76,7 +76,7 @@ class AddToPlaylistDialog :
|
||||||
|
|
||||||
// --- VIEWMODEL SETUP ---
|
// --- VIEWMODEL SETUP ---
|
||||||
pickerModel.setSongsToAdd(args.songUids)
|
pickerModel.setSongsToAdd(args.songUids)
|
||||||
collect(musicModel.playlistDecision.flow, ::handleDecision)
|
musicModel.playlistDecision.consume()
|
||||||
collectImmediately(pickerModel.currentSongsToAdd, ::updatePendingSongs)
|
collectImmediately(pickerModel.currentSongsToAdd, ::updatePendingSongs)
|
||||||
collectImmediately(pickerModel.playlistAddChoices, ::updatePlaylistChoices)
|
collectImmediately(pickerModel.playlistAddChoices, ::updatePlaylistChoices)
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,6 +263,9 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/show_artist"
|
android:id="@+id/show_artist"
|
||||||
app:destination="@id/artist_detail_fragment" />
|
app:destination="@id/artist_detail_fragment" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/show_artist_choices"
|
||||||
|
app:destination="@id/show_artist_choices_dialog" />
|
||||||
<action
|
<action
|
||||||
android:id="@+id/open_song_menu"
|
android:id="@+id/open_song_menu"
|
||||||
app:destination="@id/song_menu_dialog" />
|
app:destination="@id/song_menu_dialog" />
|
||||||
|
|
Loading…
Reference in a new issue