Check both length and null for 'No recommendations found'

This commit is contained in:
Koen J 2024-09-10 12:25:30 +02:00
parent 8c4e511883
commit f20a708b36

View file

@ -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))