mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 02:13:33 +00:00
33 lines
979 B
Java
33 lines
979 B
Java
package com.cappielloantonio.tempo.viewmodel;
|
|
|
|
import android.app.Application;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.lifecycle.AndroidViewModel;
|
|
|
|
import com.cappielloantonio.tempo.repository.PodcastRepository;
|
|
import com.cappielloantonio.tempo.subsonic.models.PodcastEpisode;
|
|
|
|
public class PodcastEpisodeBottomSheetViewModel extends AndroidViewModel {
|
|
private final PodcastRepository podcastRepository;
|
|
|
|
private PodcastEpisode podcastEpisode;
|
|
|
|
public PodcastEpisodeBottomSheetViewModel(@NonNull Application application) {
|
|
super(application);
|
|
|
|
podcastRepository = new PodcastRepository();
|
|
}
|
|
|
|
public PodcastEpisode getPodcastEpisode() {
|
|
return podcastEpisode;
|
|
}
|
|
|
|
public void setPodcastEpisode(PodcastEpisode podcast) {
|
|
this.podcastEpisode = podcast;
|
|
}
|
|
|
|
public void deletePodcastEpisode() {
|
|
if (podcastEpisode != null) podcastRepository.deletePodcastEpisode(podcastEpisode.getId());
|
|
}
|
|
}
|