From f20a708b36b4d02626b4d7caebc9fd9225d1406c Mon Sep 17 00:00:00 2001 From: Koen J Date: Tue, 10 Sep 2024 12:25:30 +0200 Subject: [PATCH] Check both length and null for 'No recommendations found' --- .../fragment/mainactivity/main/VideoDetailView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b001360c..ee835a3e 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 @@ -2376,7 +2376,7 @@ class VideoDetailView : ConstraintLayout { if (_tabIndex == 2) { _layoutRecommended.removeAllViews() - if (results == null) { + if (results == null || results.isEmpty()) { _layoutRecommended.addView(TextView(context).apply { layoutParams = LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT).apply { setMargins(20.dp(resources), 20.dp(resources), 20.dp(resources), 20.dp(resources))