Skip to content

Commit f2c4a33

Browse files
fix: autoplay plays the previous video instead of the expected current one
1 parent ddc7203 commit f2c4a33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

android/src/main/kotlin/project/pipepipe/app/ui/screens/videodetail/VideoDetailScreen.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ fun VideoDetailScreen(modifier: Modifier, navController: NavHostController) {
143143
var hasAutoPlayed by remember { mutableStateOf(false) }
144144

145145
LaunchedEffect(streamInfo, mediaController, uiState.pageState) {
146-
if (streamInfo != null && mediaController != null &&
147-
uiState.pageState == VideoDetailPageState.DETAIL_PAGE
146+
if (streamInfo != null && mediaController != null
147+
&& uiState.pageState == VideoDetailPageState.DETAIL_PAGE
148+
&& !uiState.common.isLoading
148149
) {
149150
// Check if this video was playing before minimizing
150151
val wasPlayingBeforeMinimizing = SharedContext.playingVideoUrlBeforeMinimizing == streamInfo.url

0 commit comments

Comments
 (0)