Skip to content

Commit ebbab1b

Browse files
fix: music play mode sometimes resulting in bottom player not shown
1 parent 68d361a commit ebbab1b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

android/src/main/kotlin/project/pipepipe/app/ui/screens/playlistdetail/PlaylistDetailScreen.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import com.google.common.util.concurrent.MoreExecutors
3838
import dev.icerock.moko.resources.compose.stringResource
3939
import dev.icerock.moko.resources.desc.desc
4040
import kotlinx.coroutines.GlobalScope
41+
import kotlinx.coroutines.delay
4142
import kotlinx.coroutines.launch
4243
import project.pipepipe.app.MR
4344
import project.pipepipe.app.PlaybackMode
@@ -193,7 +194,10 @@ fun PlaylistDetailScreen(
193194
controller.prepare()
194195
controller.play()
195196
if (SharedContext.sharedVideoDetailViewModel.uiState.value.pageState == VideoDetailPageState.HIDDEN) {
196-
SharedContext.sharedVideoDetailViewModel.showAsBottomPlayer()
197+
GlobalScope.launch {
198+
delay(500)
199+
SharedContext.sharedVideoDetailViewModel.showAsBottomPlayer()
200+
}
197201
}
198202
}
199203
}

0 commit comments

Comments
 (0)