Repository navigation
feat(settings): turn the waifu2x reader default into a switch - #101
Merged
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: theSettingsPickerRowforUpscaleModebecomes aSettingsSwitchRow.checked = mode == Auto; toggling on writesAuto, toggling off writesOff. No other behaviour moves — the auto-trigger threshold slider is still shown only underAuto, and denoise / precision / preload still gate onmode != Off.reader_upscale_mode_title("Upscaling mode" / 超分模式) lost its only caller and is replaced byreader_upscale_enable— "Upscale low-resolution pages" / 低分辨率页面超分 / 低解析度頁面超分 — invalues,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.