mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 07:03:35 +00:00
Added a shuffle button in the artist's fragment
This commit is contained in:
@@ -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