|
|
@ -8,16 +8,12 @@ import com.github.apognu.otter.fragments.AlbumsGridFragment |
|
|
|
import com.github.apognu.otter.fragments.ArtistsFragment |
|
|
|
import com.github.apognu.otter.fragments.ArtistsFragment |
|
|
|
import com.github.apognu.otter.fragments.FavoritesFragment |
|
|
|
import com.github.apognu.otter.fragments.FavoritesFragment |
|
|
|
import com.github.apognu.otter.fragments.PlaylistsFragment |
|
|
|
import com.github.apognu.otter.fragments.PlaylistsFragment |
|
|
|
import com.preference.PowerPreference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BrowseTabsAdapter(val context: Fragment, manager: FragmentManager) : FragmentPagerAdapter(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) { |
|
|
|
class BrowseTabsAdapter(val context: Fragment, manager: FragmentManager) : FragmentPagerAdapter(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) { |
|
|
|
var tabs = mutableListOf<Fragment>() |
|
|
|
var tabs = mutableListOf<Fragment>() |
|
|
|
|
|
|
|
|
|
|
|
override fun getCount(): Int { |
|
|
|
override fun getCount(): Int { |
|
|
|
return when (PowerPreference.getDefaultFile().getBoolean("experiments", false)) { |
|
|
|
return 4 |
|
|
|
true -> 4 |
|
|
|
|
|
|
|
false -> 3 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun getItem(position: Int): Fragment { |
|
|
|
override fun getItem(position: Int): Fragment { |
|
|
|