From a2d9a3f770b51eab303b9bf8d730fa72d32d9120 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 25 Jul 2023 09:03:56 -0400 Subject: [PATCH] Runs the DisposableEffect before moving to load the video. --- .../com/vitorpamplona/amethyst/ui/components/VideoView.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/components/VideoView.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/components/VideoView.kt index 5bd52a24c..db77802af 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/components/VideoView.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/components/VideoView.kt @@ -324,10 +324,6 @@ fun GetVideoController( } } - controller.value?.let { - inner(it, keepPlaying) - } - // User pauses and resumes the app. What to do with videos? val scope = rememberCoroutineScope() val lifeCycleOwner = LocalLifecycleOwner.current @@ -392,6 +388,10 @@ fun GetVideoController( } } } + + controller.value?.let { + inner(it, keepPlaying) + } } // background playing mutex.