Skip to content

Commit eeaaf98

Browse files
committed
fix: time the sponsor skip notice from the skip itself
1 parent a6e2657 commit eeaaf98

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎feature/player/src/main/java/video/typetype/tv/ui/player/PlayerContent.kt‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ fun PlayerContent(
136136

137137
ControlsTimingEffects(session, state, root = root, seek = seek, play = play)
138138
val noticeVisible = session.notice.segment != null && !session.controlsVisible && session.panel == null
139-
LaunchedEffect(noticeVisible) {
140-
if (noticeVisible) {
139+
// Counted from the skip, not from when the notice shows: a skip made while the controls were open must not
140+
// come back later, nor let Left undo it long after.
141+
LaunchedEffect(session.notice.segment) {
142+
if (session.notice.segment != null) {
141143
delay(NOTICE_VISIBLE_MILLIS)
142144
session.notice.dismiss()
143145
}

0 commit comments

Comments
 (0)