mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2025-02-18 13:59:24 +00:00
Increase amount of home sections from 7 to 10
Some checks failed
Some checks failed
This commit is contained in:
parent
fe66a61ce0
commit
7b61de171d
@ -24,10 +24,26 @@ class UserSettingPreferences(
|
||||
val homesection4 = enumPreference("homesection4", HomeSectionType.LIVE_TV)
|
||||
val homesection5 = enumPreference("homesection5", HomeSectionType.NEXT_UP)
|
||||
val homesection6 = enumPreference("homesection6", HomeSectionType.LATEST_MEDIA)
|
||||
val homesection7 = enumPreference("homesection7", HomeSectionType.NONE)
|
||||
val homesection8 = enumPreference("homesection8", HomeSectionType.NONE)
|
||||
val homesection9 = enumPreference("homesection9", HomeSectionType.NONE)
|
||||
}
|
||||
|
||||
val homesections
|
||||
get() = listOf(homesection0, homesection1, homesection2, homesection3, homesection4, homesection5, homesection6)
|
||||
val homesections = listOf(
|
||||
homesection0,
|
||||
homesection1,
|
||||
homesection2,
|
||||
homesection3,
|
||||
homesection4,
|
||||
homesection5,
|
||||
homesection6,
|
||||
homesection7,
|
||||
homesection8,
|
||||
homesection9,
|
||||
)
|
||||
|
||||
val activeHomesections
|
||||
get() = homesections
|
||||
.map(::get)
|
||||
.filterNot { it == HomeSectionType.NONE }
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class HomeRowsFragment : RowsSupportFragment(), AudioEventListener, View.OnKeyLi
|
||||
}
|
||||
|
||||
// Start out with default sections
|
||||
val homesections = userSettingPreferences.homesections
|
||||
val homesections = userSettingPreferences.activeHomesections
|
||||
var includeLiveTvRows = false
|
||||
|
||||
// Check for live TV support
|
||||
|
@ -21,15 +21,7 @@ class HomePreferencesScreen : OptionsFragment() {
|
||||
category {
|
||||
setTitle(R.string.home_sections)
|
||||
|
||||
arrayOf(
|
||||
UserSettingPreferences.homesection0,
|
||||
UserSettingPreferences.homesection1,
|
||||
UserSettingPreferences.homesection2,
|
||||
UserSettingPreferences.homesection3,
|
||||
UserSettingPreferences.homesection4,
|
||||
UserSettingPreferences.homesection5,
|
||||
UserSettingPreferences.homesection6,
|
||||
).forEachIndexed { index, section ->
|
||||
userSettingPreferences.homesections.forEachIndexed { index, section ->
|
||||
enum<HomeSectionType> {
|
||||
title = getString(R.string.home_section_i, index + 1)
|
||||
bind(userSettingPreferences, section)
|
||||
|
Loading…
x
Reference in New Issue
Block a user