|
|
|
@ -8,16 +8,12 @@ import com.github.apognu.otter.fragments.AlbumsGridFragment
@@ -8,16 +8,12 @@ import com.github.apognu.otter.fragments.AlbumsGridFragment
|
|
|
|
|
import com.github.apognu.otter.fragments.ArtistsFragment |
|
|
|
|
import com.github.apognu.otter.fragments.FavoritesFragment |
|
|
|
|
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) { |
|
|
|
|
var tabs = mutableListOf<Fragment>() |
|
|
|
|
|
|
|
|
|
override fun getCount(): Int { |
|
|
|
|
return when (PowerPreference.getDefaultFile().getBoolean("experiments", false)) { |
|
|
|
|
true -> 4 |
|
|
|
|
false -> 3 |
|
|
|
|
} |
|
|
|
|
return 4 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun getItem(position: Int): Fragment { |
|
|
|
|