fix: unable to view subscribed channels

Co-authored-by: Jt90-spec <80746249+Jt90-spec@users.noreply.github.com>
This commit is contained in:
Bnyro 2024-03-28 15:34:37 +01:00
parent 8bbfa954fd
commit 3b0ab2d696

View File

@ -103,10 +103,12 @@ class SubscriptionsFragment : DynamicLayoutManagerFragment() {
binding.subRefresh.isEnabled = true
binding.subProgress.isVisible = true
if (!isCurrentTabSubChannels && viewModel.videoFeed.value == null) {
viewModel.fetchSubscriptions(requireContext())
if (viewModel.videoFeed.value == null) {
viewModel.fetchFeed(requireContext())
}
if (viewModel.subscriptions.value == null) {
viewModel.fetchSubscriptions(requireContext())
}
viewModel.videoFeed.observe(viewLifecycleOwner) {
if (!isCurrentTabSubChannels && it != null) showFeed()