From 1dc6eee24284f1469c0798f34c3344a806a2c075 Mon Sep 17 00:00:00 2001 From: Koen <koen@pop-os.localdomain> Date: Wed, 20 Dec 2023 11:51:28 +0100 Subject: [PATCH] Fixed download button overlay not working in more button. --- .../fragment/mainactivity/main/VideoDetailView.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt index 076ceae9..51836b9a 100644 --- a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt +++ b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt @@ -783,9 +783,12 @@ class VideoDetailView : ConstraintLayout { } }, RoundButton(context, R.drawable.ic_download, context.getString(R.string.download), TAG_DOWNLOAD) { - video?.let { - _slideUpOverlay = UISlideOverlays.showDownloadVideoOverlay(it, _overlayContainer, context.contentResolver); - }; + fragment.lifecycleScope.launch(Dispatchers.Main) { + delay(500) + video?.let { + _slideUpOverlay = UISlideOverlays.showDownloadVideoOverlay(it, _overlayContainer, context.contentResolver); + }; + } }, RoundButton(context, R.drawable.ic_share, context.getString(R.string.share), TAG_SHARE) { video?.let { -- GitLab