Move skip segments settings to their own page (#1306)

## Description
Moves the five skip segment settings to their own page. So there's now a
single "Skip behavior" that you click to bring up the settings for the
five. I doubt many people change these frequently, so moving them to a
new page de-clutters the settings page.

### Related issues
N/A

### Testing
Emulator

## Screenshots

### Advanced settings
<img width="1280" height="720" alt="single_setting Large"
src="https://github.com/user-attachments/assets/673555d5-109c-4c43-9073-f51572bb949d"
/>

### Skip segment specific settings
<img width="1280" height="720" alt="skip_settings Large"
src="https://github.com/user-attachments/assets/dae9d0bd-7340-4731-b561-b7b4e74d9d4f"
/>

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-04-24 14:50:23 -04:00 • committed by GitHub
parent ab5c884072
commit 8dd396b777
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 37 deletions

View file

@ -114,30 +114,6 @@ sealed interface AppPreference<Pref, T> {
},
)
// val GridJumpButtons =
// AppSwitchPreference<AppPreferences>(
// title = R.string.show_grid_jump_buttons,
// defaultValue = true,
// getter = { it.interfacePreferences.showGridJumpButtons },
// setter = { prefs, value ->
// prefs.updateInterfacePreferences { showGridJumpButtons = value }
// },
// summaryOn = R.string.enabled,
// summaryOff = R.string.disabled,
// )
// val ShowGridFooter =
// AppSwitchPreference<AppPreferences>(
// title = R.string.grid_position_footer,
// defaultValue = true,
// getter = { it.interfacePreferences.showPositionFooter },
// setter = { prefs, value ->
// prefs.updateInterfacePreferences { showPositionFooter = value }
// },
// summaryOn = R.string.show,
// summaryOff = R.string.hide,
// )
val ControllerTimeout =
AppSliderPreference<AppPreferences>(
title = R.string.hide_controller_timeout,
@ -630,6 +606,13 @@ sealed interface AppPreference<Pref, T> {
valueToIndex = { if (it != SkipSegmentBehavior.UNRECOGNIZED) it.number else 0 },
)
val SkipSegments =
AppDestinationPreference<AppPreferences>(
title = R.string.skip_behavior,
summary = R.string.skip_behavior_summary,
destination = Destination.Settings(PreferenceScreenOption.SKIP_SEGMENTS),
)
val GlobalContentScale =
AppChoicePreference<AppPreferences, PrefContentScale>(
title = R.string.global_content_scale,
@ -1142,6 +1125,21 @@ val MpvPreferences =
),
)
val SkipSegmentPreferences =
listOf(
PreferenceGroup(
title = R.string.skip,
preferences =
listOf(
AppPreference.SkipIntros,
AppPreference.SkipOutros,
AppPreference.SkipCommercials,
AppPreference.SkipPreviews,
AppPreference.SkipRecaps,
),
),
)
val advancedPreferences =
buildList {
add(
@ -1169,6 +1167,7 @@ val advancedPreferences =
listOf(
AppPreference.OneClickPause,
AppPreference.GlobalContentScale,
AppPreference.SkipSegments,
AppPreference.MaxBitrate,
AppPreference.RefreshRateSwitching,
AppPreference.ResolutionSwitching,
@ -1176,19 +1175,6 @@ val advancedPreferences =
),
),
)
add(
PreferenceGroup(
title = R.string.skip,
preferences =
listOf(
AppPreference.SkipIntros,
AppPreference.SkipOutros,
AppPreference.SkipCommercials,
AppPreference.SkipPreviews,
AppPreference.SkipRecaps,
),
),
)
add(
PreferenceGroup(
title = R.string.player_backend,