mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Added download button in album page
This commit is contained in:
parent
bf70863f84
commit
ad5ef996e3
2 changed files with 16 additions and 17 deletions
|
|
@ -7,9 +7,7 @@ import androidx.lifecycle.AndroidViewModel;
|
|||
import androidx.lifecycle.LiveData;
|
||||
|
||||
import com.cappielloantonio.play.model.Album;
|
||||
import com.cappielloantonio.play.model.Artist;
|
||||
import com.cappielloantonio.play.model.Song;
|
||||
import com.cappielloantonio.play.repository.AlbumRepository;
|
||||
import com.cappielloantonio.play.repository.SongRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -17,7 +15,7 @@ import java.util.List;
|
|||
public class AlbumPageViewModel extends AndroidViewModel {
|
||||
private SongRepository songRepository;
|
||||
|
||||
private LiveData<List<Song>> songList;
|
||||
private LiveData<List<Song>> songLiveList;
|
||||
|
||||
private Album album;
|
||||
|
||||
|
|
@ -27,9 +25,13 @@ public class AlbumPageViewModel extends AndroidViewModel {
|
|||
songRepository = new SongRepository(application);
|
||||
}
|
||||
|
||||
public LiveData<List<Song>> getAlbumSongList() {
|
||||
songList = songRepository.getAlbumListLiveSong(album.getId());
|
||||
return songList;
|
||||
public LiveData<List<Song>> getAlbumSongLiveList() {
|
||||
songLiveList = songRepository.getAlbumListLiveSong(album.getId());
|
||||
return songLiveList;
|
||||
}
|
||||
|
||||
public List<Song> getAlbumSongList() {
|
||||
return songRepository.getAlbumListSong(album.getId(), false);
|
||||
}
|
||||
|
||||
public Album getAlbum() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue