Autocorrect aggressiveness: default behaves as "Modest", although "Balanced (Default)" is labeled as default
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从默认阈值常量 Defaults.PREF_AUTO_CORRECT_THRESHOLD 开始,然后将它与 Settings.applyAutoCorrectAggressivenessPreset() 中的 Balanced 值进行比较。接着阅读 Settings.readAutoCorrectAggressiveness(),了解全新安装时阈值如何映射到级别,并检查 SettingsValues 读取的是否为相同的默认值。完成标准是:全新安装在界面中显示 Balanced 并使用 Balanced 阈值,同时用户已保存的级别仍保持原有行为。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
On a fresh install, Text correction → Autocorrect aggressiveness shows Modest, but the slider labels level 2 as "Balanced (Default)". The keyboard also really uses the modest threshold, so users get much weaker autocorrection than the settings suggest.
Cause
Defaults.PREF_AUTO_CORRECT_AGGRESSIVENESS = 2(Balanced), butDefaults.PREF_AUTO_CORRECT_THRESHOLD = 0.185f, which is the Modest value inSettings.applyAutoCorrectAggressivenessPreset()(Balanced =0.067f).- As long as no aggressiveness is saved,
Settings.readAutoCorrectAggressiveness()derives the level from the threshold:threshold >= 0.18f -> AUTO_CORRECT_LEVEL_MODEST. That's why the UI shows Modest. SettingsValuesreads the threshold with the 0.185 default, so autocorrection itself also runs at Modest.
Possible fix
Set Defaults.PREF_AUTO_CORRECT_THRESHOLD = 0.067f so it matches the Balanced preset (that's what we did). Users who saved a level themselves are not affected, since their threshold is stored.
To Reproduce
- Fresh install (or clear app data).
- Settings → Text correction → enable Autocorrect.
- Autocorrect aggressiveness shows "Modest", while level 2 is labeled "Balanced (Default)".
Expected behavior
The default level is Balanced, both in the UI and in the actual threshold.
App version & Flavor
Found in GlassType, my fork based on LeanType 4.3.0 (d634e26), standard flavor. The code is unchanged in current main (0e673e1).
Device Info
- Model: Samsung Galaxy S23 Ultra (SM-S918B) and Galaxy Z Fold 3 (SM-F926B)
- OS version: Android 17 / Android 15
- 主要语言
- Kotlin
- 星标
- 1k
- 派生
- 59
- 平均合并
- 14 小时 9 分钟
- 30 天内合并 PR
- 56
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LeanBitLab/LeanType 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 62/100
LeanBitLab/LeanType#763 ·
维护者通常 1 天内回复
-
难度 3/5 半天 新手友好度 62/100
LeanBitLab/LeanType#762 ·
维护者通常 1 天内回复
-
难度 3/5 半天 新手友好度 70/100
LeanBitLab/LeanType#761 ·
维护者通常 1 天内回复
-
Native crash (SIGSEGV in getSuggestionsNative) when typing with a multilingual secondary language未关闭
难度 4/5 3-5 天 新手友好度 25/100
LeanBitLab/LeanType#759 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 30/100
LeanBitLab/LeanType#757 · 4 条评论 ·
维护者通常 1 天内回复
查看 LeanBitLab/LeanType 的全部 Issue
相似的 Issue
-
Issue: Bug
难度 2/5 1-3 小时 新手友好度 62/100
OpenAPITools/openapi-generator#25524 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
liberation-data/drivine4j#547 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ccch1mneyyy/dsh-Go#381 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
wangzan101/Mika#227 ·
维护者通常 1 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 72/100
theopenconversationkit/tock#2136 ·
维护者通常 1 天内回复