Added a shuffle button in the artist's fragment
This commit is contained in:
1 parent
a871d37781
commit
1106e34250
4 files changed
+43
-7
No files matched your search
@@ -18,6 +18,7 @@ public class ArtistPageViewModel extends AndroidViewModel {
|
||||
private SongRepository songRepository;
|
||||
private AlbumRepository albumRepository;
|
||||
|
||||
private List<Song> randomList;
|
||||
private LiveData<List<Song>> songList;
|
||||
private LiveData<List<Album>> albumList;
|
||||
|
||||
@@ -35,6 +36,11 @@ public class ArtistPageViewModel extends AndroidViewModel {
|
||||
return albumList;
|
||||
}
|
||||
|
||||
public List<Song> getArtistRandomSongList() {
|
||||
randomList = songRepository.getArtistListLiveRandomSong(artist.id);
|
||||
return randomList;
|
||||
}
|
||||
|
||||
public LiveData<List<Song>> getArtistTopSongList() {
|
||||
songList = songRepository.getArtistListLiveTopSongSample(artist.id);
|
||||
return songList;
|
||||
|
||||
Reference in new issue
Block a user