feat(ime): remember dock/float choice across keyboard shows - #64
Merged
Merged
Conversation
Heide (v0.1.20 feedback): "is there a way to have to start it directly as docked, like other keyboards do? Because as of right now, when the keyboard pops up, you have to tap on float, and then dock." The IME already starts docked — her float→dock dance is the v0.1.16 Android-16 initial-show workaround (fixed by targetSdk 36 in #60). Regardless, the last-used mode should persist: save 'floating'/'docked' in SharedPreferences on every mode change and restore it after engine creation on the next show. Docked remains the default, and the floating restore only runs when the overlay permission is already granted so a permission-less user is never bounced to system settings on open. Refs #61 #63 (same feedback email). Signed-off-by: will wade <willwade@gmail.com>
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.
What
Persists the last-used dock/float mode (SharedPreferences,
dasher_ime/start_mode) and restores it after engine creation on the next keyboard show. Docked stays the default.Why
Heide's v0.1.20 feedback: she wants the keyboard to "start directly as docked, like other keyboards do" — on v0.1.16/Android 16 she had to tap Float then Dock to get a working keyboard (that initial-show bug is already fixed by #60's targetSdk 36; this PR makes the preference stick regardless).
Guards
canDrawOverlaysis already granted — never bounces the user to system settings on openfloatingfloatDockBtnfield (was a local passed as a parameter); nulled in onDestroyTest plan
./gradlew :app:compileDebugKotlin :app:lintDebugclean (verified locally)Refs #61 #63 (same feedback email).