Skip to content

Commit

Permalink
fix startpos of video if activated by double click negative value
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Jan 3, 2024
1 parent 3da0231 commit 0962a74
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class VideoScreenComponent(
override val selectedSubtitle = MutableStateFlow<VideoComponent.Subtitle?>(null)

override val startingPos: StateFlow<Long> = 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<DialogConfig>()
Expand Down

0 comments on commit 0962a74

Please sign in to comment.