Changed the sort order of the songs in the playlist and added a download button

This commit is contained in:
CappielloAntonio 2021-06-26 15:10:49 +02:00
parent a466574e08
commit 91fd7a5b29
10 changed files with 106 additions and 12 deletions

View file

@ -17,7 +17,7 @@ public class PlaylistPageViewModel extends AndroidViewModel {
private SongRepository songRepository;
private LiveData<List<Song>> songList;
private LiveData<List<Song>> songLiveList;
private Playlist playlist;
@ -27,9 +27,13 @@ public class PlaylistPageViewModel extends AndroidViewModel {
songRepository = new SongRepository(application);
}
public LiveData<List<Song>> getPlaylistSongList() {
songList = songRepository.getPlaylistLiveSong(playlist.getId());
return songList;
public LiveData<List<Song>> getPlaylistSongLiveList() {
songLiveList = songRepository.getPlaylistLiveSong(playlist.getId());
return songLiveList;
}
public List<Song> getPlaylistSongList() {
return songRepository.getPlaylistSong(playlist.getId());
}
public Playlist getPlaylist() {