adjust tab order

This commit is contained in:
Kai DeLorenzo 2024-06-07 09:53:19 -05:00
commit ebb4693425
No known key found for this signature in database

View file

@ -345,7 +345,7 @@ class ChannelFragment : MainFragment() {
} }
} }
fun selectTab(selectedTabIndex: Int) { private fun selectTab(selectedTabIndex: Int) {
_selectedTabIndex = selectedTabIndex _selectedTabIndex = selectedTabIndex
_tabs.selectTab(_tabs.getTabAt(selectedTabIndex)) _tabs.selectTab(_tabs.getTabAt(selectedTabIndex))
} }
@ -463,7 +463,7 @@ class ChannelFragment : MainFragment() {
val supportsPlaylists = val supportsPlaylists =
StatePlatform.instance.getChannelClient(channel.url).capabilities.hasGetChannelPlaylists StatePlatform.instance.getChannelClient(channel.url).capabilities.hasGetChannelPlaylists
val playlistPosition = 2 val playlistPosition = 1
if (supportsPlaylists && !(_viewPager.adapter as ChannelViewPagerAdapter).containsItem( if (supportsPlaylists && !(_viewPager.adapter as ChannelViewPagerAdapter).containsItem(
ChannelTab.PLAYLISTS.ordinal.toLong() ChannelTab.PLAYLISTS.ordinal.toLong()
) )
@ -564,7 +564,7 @@ class ChannelFragment : MainFragment() {
(fragment as IChannelTabFragment).setPolycentricProfile(profile) (fragment as IChannelTabFragment).setPolycentricProfile(profile)
} }
val insertPosition = 2 val insertPosition = 1
//TODO only add channels and support if its setup on the polycentric profile //TODO only add channels and support if its setup on the polycentric profile
if (profile != null && !(_viewPager.adapter as ChannelViewPagerAdapter).containsItem( if (profile != null && !(_viewPager.adapter as ChannelViewPagerAdapter).containsItem(