mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
feat: added podcast description to the right page of the player
This commit is contained in:
parent
c20cadff94
commit
67905affd3
4 changed files with 30 additions and 11 deletions
|
|
@ -42,6 +42,7 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
|||
private final FavoriteRepository favoriteRepository;
|
||||
|
||||
private final MutableLiveData<String> lyricsLiveData = new MutableLiveData<>(null);
|
||||
private final MutableLiveData<String> descriptionLiveData = new MutableLiveData<>(null);
|
||||
|
||||
private final MutableLiveData<Child> liveMedia = new MutableLiveData<>(null);
|
||||
private final MutableLiveData<ArtistID3> liveArtist = new MutableLiveData<>(null);
|
||||
|
|
@ -137,6 +138,7 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
|||
switch (mediaType) {
|
||||
case Constants.MEDIA_TYPE_MUSIC:
|
||||
songRepository.getSong(mediaId).observe(owner, liveMedia::postValue);
|
||||
descriptionLiveData.postValue(null);
|
||||
break;
|
||||
case Constants.MEDIA_TYPE_PODCAST:
|
||||
liveMedia.postValue(null);
|
||||
|
|
@ -162,6 +164,14 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
|||
}
|
||||
}
|
||||
|
||||
public void setLiveDescription(String description) {
|
||||
descriptionLiveData.postValue(description);
|
||||
}
|
||||
|
||||
public LiveData<String> getLiveDescription() {
|
||||
return descriptionLiveData;
|
||||
}
|
||||
|
||||
public LiveData<List<Child>> getMediaInstantMix(LifecycleOwner owner, Child media) {
|
||||
instantMix.setValue(Collections.emptyList());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue