Skip to content

Refactor: Split DeviceLocales out of Keyboard2#1154

Merged
Julow merged 4 commits intomasterfrom
device_locales
Jan 18, 2026
Merged

Refactor: Split DeviceLocales out of Keyboard2#1154
Julow merged 4 commits intomasterfrom
device_locales

Conversation

@Julow
Copy link
Copy Markdown
Owner

@Julow Julow commented Jan 18, 2026

This PR extracts refactoring needed in #1137

Julow added 4 commits January 18, 2026 17:13
This moves the code from Keyboard2 that handles the active IME subtypes
and the current one.

The goal is to access this information from the dictionary activity
while simplifying the code of Keyboard2.
This fixes the status message being inconsistently shown.
Previously, [DeviceLocales.load()] was called everytime the keyboard was
shown on the screen. This operation is moderately costly and only need
to be done when the IME subtype changes.
@Julow Julow merged commit a848897 into master Jan 18, 2026
6 checks passed
pashol pushed a commit to pashol/Unexpected-Keyboard that referenced this pull request Mar 25, 2026
* Refactor: Split DeviceLocales out of Keyboard2

This moves the code from Keyboard2 that handles the active IME subtypes
and the current one.

The goal is to access this information from the dictionary activity
while simplifying the code of Keyboard2.

* Refresh the candidates view when subtype changes

This fixes the status message being inconsistently shown.

* Refactor: Load DeviceLocales less often

Previously, [DeviceLocales.load()] was called everytime the keyboard was
shown on the screen. This operation is moderately costly and only need
to be done when the IME subtype changes.

* EditorConfig: Fix crash on Android 9
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