diff --git a/app/shared/src/commonMain/kotlin/dev/datlag/burningseries/shared/ui/screen/video/VideoScreenComponent.kt b/app/shared/src/commonMain/kotlin/dev/datlag/burningseries/shared/ui/screen/video/VideoScreenComponent.kt index 94c7fc47..a106f3e0 100644 --- a/app/shared/src/commonMain/kotlin/dev/datlag/burningseries/shared/ui/screen/video/VideoScreenComponent.kt +++ b/app/shared/src/commonMain/kotlin/dev/datlag/burningseries/shared/ui/screen/video/VideoScreenComponent.kt @@ -57,7 +57,7 @@ class VideoScreenComponent( override val selectedSubtitle = MutableStateFlow(null) override val startingPos: StateFlow = dbEpisode.transform { - return@transform emit(it?.progress ?: 0L) + return@transform emit(max(it?.progress ?: 0L, 0L)) }.flowOn(ioDispatcher()).stateIn(ioScope(), SharingStarted.WhileSubscribed(), dbEpisode.value?.progress ?: 0L) private val dialogNavigation = SlotNavigation()