From f02a997ed0d0ea48018058d82d375d78fc3db479 Mon Sep 17 00:00:00 2001 From: parneet-guraya Date: Sun, 1 Sep 2024 21:58:45 +0530 Subject: [PATCH] hide stub view when player ready Signed-off-by: parneet-guraya --- .../com/owncloud/android/ui/preview/PreviewMediaActivity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt index ce5a408885..aa94cc204c 100644 --- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt @@ -259,7 +259,7 @@ class PreviewMediaActivity : binding.emptyView.emptyListView.visibility = View.VISIBLE } - private fun setVideoErrorMessage(headline: String, @StringRes message: Int) { + private fun setErrorMessage(headline: String, @StringRes message: Int) { binding.emptyView.run { emptyListViewHeadline.text = headline emptyListViewText.setText(message) @@ -401,6 +401,7 @@ class PreviewMediaActivity : override fun onPlaybackStateChanged(playbackState: Int) { if (playbackState == Player.STATE_READY) { hideProgressLayout() + binding.emptyView.emptyListView.visibility = View.GONE } } @@ -720,7 +721,7 @@ class PreviewMediaActivity : } } else { emptyListView?.visibility = View.VISIBLE - setVideoErrorMessage( + setErrorMessage( weakReference.getString(R.string.stream_not_possible_headline), R.string.stream_not_possible_message )