mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 04:28:00 +01:00
Hide video preview on error
This commit is contained in:
parent
fafd6343d9
commit
43eff348e6
1 changed files with 1 additions and 0 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue