From 43eff348e6e2b9ba651d049ac8a55f6f4e30792d Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Fri, 27 Sep 2024 22:39:05 +0530 Subject: [PATCH] Hide video preview on error --- .../main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt index e2045c237..fe5f2ba0d 100644 --- a/app/src/main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt @@ -450,6 +450,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S override fun onPlayerErrorChanged(error: PlaybackException?) { binding.errorMessageHolder.errorMessage.apply { if (error != null) { + binding.videoPreview.beGone() binding.videoPlayOutline.beGone() text = error.localizedMessage ?: getString(R.string.failed_to_load_media) setTextColor(if (context.config.blackBackground) Color.WHITE else context.getProperTextColor())