mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Limited the number of elements present in each section of the library
This commit is contained in:
parent
8b44f8476f
commit
fcc1af8b1f
1 changed files with 4 additions and 4 deletions
|
|
@ -44,8 +44,8 @@ public class LibraryViewModel extends AndroidViewModel {
|
|||
|
||||
// Inizializzate all'interno del costruttore, in modo da rimanere immutabili per tutto il
|
||||
// ciclo di vita dell'applicazione
|
||||
albumRepository.getAlbums("random", 20, null, null).observeForever(sampleAlbum::postValue);
|
||||
artistRepository.getArtists(true, 20).observeForever(sampleArtist::postValue);
|
||||
albumRepository.getAlbums("random", 10, null, null).observeForever(sampleAlbum::postValue);
|
||||
artistRepository.getArtists(true, 10).observeForever(sampleArtist::postValue);
|
||||
genreRepository.getGenres(true, 15).observeForever(sampleGenres::postValue);
|
||||
playlistRepository.getPlaylists(true, 10).observeForever(playlistSample::postValue);
|
||||
}
|
||||
|
|
@ -67,11 +67,11 @@ public class LibraryViewModel extends AndroidViewModel {
|
|||
}
|
||||
|
||||
public void refreshAlbumSample(LifecycleOwner owner) {
|
||||
albumRepository.getAlbums("random", 20, null, null).observe(owner, sampleAlbum::postValue);
|
||||
albumRepository.getAlbums("random", 10, null, null).observe(owner, sampleAlbum::postValue);
|
||||
}
|
||||
|
||||
public void refreshArtistSample(LifecycleOwner owner) {
|
||||
artistRepository.getArtists(true, 20).observe(owner, sampleArtist::postValue);
|
||||
artistRepository.getArtists(true, 10).observe(owner, sampleArtist::postValue);
|
||||
}
|
||||
|
||||
public void refreshGenreSample(LifecycleOwner owner) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue