From 2151fd2dc97966909811d7d116207a5fc66b1127 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 26 Aug 2022 19:05:30 +0200 Subject: [PATCH] minor fixes --- .../libretube/fragments/SubscriptionsFragment.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/github/libretube/fragments/SubscriptionsFragment.kt b/app/src/main/java/com/github/libretube/fragments/SubscriptionsFragment.kt index bc00b340c..d1b4efb03 100644 --- a/app/src/main/java/com/github/libretube/fragments/SubscriptionsFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/SubscriptionsFragment.kt @@ -134,8 +134,11 @@ class SubscriptionsFragment : BaseFragment() { else -> feed } - binding.subFeedContainer.visibility = if (viewModel.videoFeed.value!!.isEmpty()) View.GONE else View.VISIBLE - binding.emptyFeed.visibility = if (viewModel.videoFeed.value!!.isEmpty()) View.VISIBLE else View.GONE + binding.subChannelsContainer.visibility = View.GONE + binding.subFeedContainer.visibility = + if (viewModel.videoFeed.value!!.isEmpty()) View.GONE else View.VISIBLE + binding.emptyFeed.visibility = + if (viewModel.videoFeed.value!!.isEmpty()) View.VISIBLE else View.GONE binding.subProgress.visibility = View.GONE subscriptionAdapter = TrendingAdapter(sortedFeed, childFragmentManager, false) @@ -169,6 +172,7 @@ class SubscriptionsFragment : BaseFragment() { viewModel.subscriptions.value!!.toMutableList() ) + binding.subFeedContainer.visibility = View.GONE binding.subChannelsContainer.visibility = if (viewModel.subscriptions.value!!.isEmpty()) View.GONE else View.VISIBLE binding.emptyFeed.visibility = @@ -176,6 +180,6 @@ class SubscriptionsFragment : BaseFragment() { } private fun isShowingFeed(): Boolean { - return binding.subFeedContainer.isVisible + return !binding.subChannelsContainer.isVisible } }