mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
33 lines
993 B
Java
33 lines
993 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.PodcastChannel;
|
|
|
|
public class PodcastChannelBottomSheetViewModel extends AndroidViewModel {
|
|
private final PodcastRepository podcastRepository;
|
|
|
|
private PodcastChannel podcastChannel;
|
|
|
|
public PodcastChannelBottomSheetViewModel(@NonNull Application application) {
|
|
super(application);
|
|
|
|
podcastRepository = new PodcastRepository();
|
|
}
|
|
|
|
public PodcastChannel getPodcastChannel() {
|
|
return podcastChannel;
|
|
}
|
|
|
|
public void setPodcastChannel(PodcastChannel podcastChannel) {
|
|
this.podcastChannel = podcastChannel;
|
|
}
|
|
|
|
public void deletePodcastChannel() {
|
|
if (podcastChannel != null) podcastRepository.deletePodcastChannel(podcastChannel.getId());
|
|
}
|
|
}
|