Autocorrect aggressiveness: default behaves as "Modest", although "Balanced (Default)" is labeled as default
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Bắt đầu với hằng số ngưỡng mặc định Defaults.PREF_AUTO_CORRECT_THRESHOLD, sau đó so sánh với giá trị Balanced trong Settings.applyAutoCorrectAggressivenessPreset(). Tiếp theo, đọc Settings.readAutoCorrectAggressiveness() để xem cách một bản cài đặt mới ánh xạ ngưỡng thành mức, và kiểm tra SettingsValues đọc cùng giá trị mặc định. Hoàn thành khi bản cài đặt mới hiển thị Balanced trên giao diện và dùng ngưỡng Balanced, còn các mức do người dùng lưu vẫn hoạt động như trước.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Kotlin
- Star
- 1k
- Fork
- 59
- Merge trung bình
- 14 giờ 9 phút
- Pull request đã merge (30 ngày)
- 56
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của LeanBitLab/LeanType
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
LeanBitLab/LeanType#763 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
LeanBitLab/LeanType#762 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 70/100
LeanBitLab/LeanType#761 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Native crash (SIGSEGV in getSuggestionsNative) when typing with a multilingual secondary languageĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
LeanBitLab/LeanType#759 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature Request] Add "Swipe left on delete key to delete word by word" gesture (like SwiftKey)Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
LeanBitLab/LeanType#757 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của LeanBitLab/LeanType
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
liberation-data/drivine4j#547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ccch1mneyyy/dsh-Go#381 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
wangzan101/Mika#227 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
theopenconversationkit/tock#2136 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Kotlin/kotlin-lsp#302 ·