mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Added a shuffle button in the artist's fragment
This commit is contained in:
parent
a871d37781
commit
1106e34250
4 changed files with 43 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue