mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Added download UI in home screen
This commit is contained in:
parent
e0569c3901
commit
bf70863f84
8 changed files with 109 additions and 3 deletions
|
|
@ -20,6 +20,7 @@ public class HomeViewModel extends AndroidViewModel {
|
|||
private LiveData<List<Song>> recentlyAddedSongSample;
|
||||
private LiveData<List<Song>> mostPlayedSongSample;
|
||||
private LiveData<List<Song>> favoritesSongSample;
|
||||
private LiveData<List<Song>> downloadedSongSample;
|
||||
private List<Integer> years;
|
||||
|
||||
public HomeViewModel(@NonNull Application application) {
|
||||
|
|
@ -32,6 +33,7 @@ public class HomeViewModel extends AndroidViewModel {
|
|||
recentlyAddedSongSample = songRepository.getListLiveRecentlyAddedSampleSong(20);
|
||||
mostPlayedSongSample = songRepository.getListLiveMostPlayedSampleSong(20);
|
||||
favoritesSongSample = songRepository.getListLiveFavoritesSampleSong(20);
|
||||
downloadedSongSample = songRepository.getListLiveDownloadedSampleSong(20);
|
||||
years = songRepository.getYearList();
|
||||
}
|
||||
|
||||
|
|
@ -63,4 +65,8 @@ public class HomeViewModel extends AndroidViewModel {
|
|||
public LiveData<List<Song>> getFavorites() {
|
||||
return favoritesSongSample;
|
||||
}
|
||||
|
||||
public LiveData<List<Song>> getDownloaded() {
|
||||
return downloadedSongSample;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue