Skip to content

feat(settings): turn the waifu2x reader default into a switch - #101

Merged
dyphire merged 1 commit into
mainfrom
feat/upscale-switch
Nov 28, 2026
Merged

dyphire merged 1 commit into
mainfrom
feat/upscale-switch

Conversation

@dyphire

@dyphire dyphire commented Nov 28, 2026

Copy link
Copy Markdown
Member

Problem

The reader defaults page presented waifu2x as a two-item picker ("Off" / "Auto"), even though the setting only encodes a boolean: upscaling is either enabled (auto-triggered) or disabled. A picker for a binary choice costs a tap, an extra row of chrome, and reads like a third state exists.

Change

  • ui/settings/ReaderDefaultsScreen.kt: the SettingsPickerRow for UpscaleMode becomes a SettingsSwitchRow. checked = mode == Auto; toggling on writes Auto, toggling off writes Off. No other behaviour moves — the auto-trigger threshold slider is still shown only under Auto, and denoise / precision / preload still gate on mode != Off.
  • Strings: reader_upscale_mode_title ("Upscaling mode" / 超分模式) lost its only caller and is replaced by reader_upscale_enable — "Upscale low-resolution pages" / 低分辨率页面超分 / 低解析度頁面超分 — in values, values-zh-rCN, values-zh-rTW. The section title and footer are unchanged, so the explanatory text is not duplicated.

Not touched: the in-reader settings sheet (ReaderSettingsSheet.kt) still uses the compact choice row; this PR keeps the change to the defaults page only.

Verification

  • ./gradlew :app:compileDebugKotlin — pass
  • ./gradlew :app:testDebugUnitTest — pass
  • ./gradlew :app:lintDebug — pass (exit 0; only pre-existing baselined findings remain)

No device run: the change is a component swap on an existing settings row; the stored value semantics (UpscaleMode.Auto / UpscaleMode.Off) are unchanged, so nothing in the reader path needs re-testing.

Off/auto is a binary choice, so the reader defaults page now shows a
switch instead of a two-item picker. On stores Auto (the only enabled
trigger), off stores Off; the threshold slider and the denoise/precision/
preload rows keep their existing Auto/not-Off gating. The now unused
reader_upscale_mode_title string is replaced by reader_upscale_enable
(en, zh-rCN, zh-rTW).
@dyphire
dyphire merged commit a5f5b36 into main Nov 28, 2026
1 check passed
@dyphire
dyphire deleted the feat/upscale-switch branch November 28, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant