mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-14 16:37:16 +03:00
Fix the warning 'ID must not be null'
This commit is contained in:
parent
2c3f43f139
commit
0e2171b872
@ -574,14 +574,14 @@ open class TrackCollectionFragment(
|
||||
} else if (getVideos) {
|
||||
setTitle(R.string.main_videos)
|
||||
listModel.getVideos(refresh2)
|
||||
} else if (getRandomTracks) {
|
||||
} else if (id == null || getRandomTracks) {
|
||||
// There seems to be a bug in ViewPager when resuming the Actitivy that subfragments
|
||||
// arguments are empty. If we have no id, just show some random tracks
|
||||
setTitle(R.string.main_songs_random)
|
||||
listModel.getRandom(size, append)
|
||||
} else {
|
||||
setTitle(name)
|
||||
requireNotNull(id) {
|
||||
"ID must be set. NavArgs: ${navArgs.toBundle()}"
|
||||
}
|
||||
|
||||
if (ActiveServerProvider.isID3Enabled()) {
|
||||
if (isAlbum) {
|
||||
listModel.getAlbum(refresh2, id, name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user