mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Fix starred artists loading when there are no starred artists
This commit is contained in:
parent
8392d01fc5
commit
94072555e7
1 changed files with 4 additions and 1 deletions
|
|
@ -91,6 +91,10 @@ public class ArtistRepository {
|
|||
* Metodo che mi restituisce le informazioni essenzionali dell'artista (cover, numero di album...)
|
||||
*/
|
||||
public void getArtistInfo(List<Artist> artists, MutableLiveData<List<Artist>> list) {
|
||||
List<Artist> liveArtists = list.getValue();
|
||||
if(liveArtists == null) liveArtists = new ArrayList<>();
|
||||
list.setValue(liveArtists);
|
||||
|
||||
for (Artist artist : artists) {
|
||||
App.getSubsonicClientInstance(application, false)
|
||||
.getBrowsingClient()
|
||||
|
|
@ -310,7 +314,6 @@ public class ArtistRepository {
|
|||
|
||||
private void addToMutableLiveData(MutableLiveData<List<Artist>> liveData, Artist artist) {
|
||||
List<Artist> liveArtists = liveData.getValue();
|
||||
if(liveArtists == null) liveArtists = new ArrayList<>();
|
||||
liveArtists.add(artist);
|
||||
liveData.setValue(liveArtists);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue