mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Refactoring - Removed most of the click listeners from the adapters and moved them into the appropriate fragments
This commit is contained in:
parent
29f56945c2
commit
754fc69eab
54 changed files with 1143 additions and 1137 deletions
|
|
@ -19,6 +19,7 @@ import com.cappielloantonio.play.util.DownloadUtil;
|
|||
import com.cappielloantonio.play.util.MappingUtil;
|
||||
import com.cappielloantonio.play.util.PreferenceUtil;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
||||
|
|
@ -32,6 +33,8 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
|||
|
||||
private final MutableLiveData<Media> liveMedia = new MutableLiveData<>(null);
|
||||
private final MutableLiveData<Artist> liveArtist = new MutableLiveData<>(null);
|
||||
private final MutableLiveData<List<Media>> instantMix = new MutableLiveData<>(null);
|
||||
|
||||
|
||||
public PlayerBottomSheetViewModel(@NonNull Application application) {
|
||||
super(application);
|
||||
|
|
@ -105,4 +108,12 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public LiveData<List<Media>> getMediaInstantMix(LifecycleOwner owner, Media media) {
|
||||
instantMix.setValue(Collections.emptyList());
|
||||
|
||||
songRepository.getInstantMix(media, 20).observe(owner, instantMix::postValue);
|
||||
|
||||
return instantMix;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue