mirror of
https://github.com/bbara04/Purefin.git
synced 2026-03-31 17:10:08 +02:00
Return to episode screen after playback
This commit is contained in:
@@ -5,8 +5,6 @@ import androidx.lifecycle.viewModelScope
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import hu.bbara.purefin.core.data.AppContentRepository
|
||||
import hu.bbara.purefin.core.data.navigation.NavigationManager
|
||||
import hu.bbara.purefin.core.data.navigation.Route
|
||||
import hu.bbara.purefin.core.data.navigation.SeriesDto
|
||||
import hu.bbara.purefin.core.model.Episode
|
||||
import hu.bbara.purefin.feature.download.DownloadState
|
||||
import hu.bbara.purefin.feature.download.MediaDownloadManager
|
||||
@@ -51,20 +49,8 @@ class EpisodeScreenViewModel @Inject constructor(
|
||||
navigationManager.pop()
|
||||
}
|
||||
|
||||
fun onPlay() {
|
||||
val id = _episodeId.value?.toString() ?: return
|
||||
navigationManager.navigate(Route.PlayerRoute(mediaId = id))
|
||||
}
|
||||
|
||||
fun onPlaybackStarted() {
|
||||
val seriesId = _seriesId.value ?: return
|
||||
navigationManager.pop()
|
||||
navigationManager.navigate(Route.SeriesRoute(SeriesDto(id = seriesId)))
|
||||
}
|
||||
|
||||
fun onSeriesClick() {
|
||||
val seriesId = _seriesId.value ?: return
|
||||
navigationManager.navigate(Route.SeriesRoute(SeriesDto(id = seriesId)))
|
||||
navigationManager.pop()
|
||||
}
|
||||
|
||||
fun selectEpisode(seriesId: UUID, seasonId: UUID, episodeId: UUID) {
|
||||
|
||||
Reference in New Issue
Block a user