mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Only update subtype when it changes
This commit is contained in:
parent
be5ed15220
commit
4e2d80fc67
@ -211,12 +211,13 @@ class LatinIME : InputMethodService(), LifecycleOwner, ViewModelStoreOwner, Save
|
||||
// Called by UixManager when the intention is to subsequently call LegacyKeyboardView with hidden=false
|
||||
// Maybe this can be changed to LaunchedEffect
|
||||
fun onKeyboardShown() {
|
||||
//if(pendingRecreateKeyboard) {
|
||||
// pendingRecreateKeyboard = false
|
||||
// recreateKeyboard()
|
||||
//}
|
||||
if(pendingRecreateKeyboard) {
|
||||
pendingRecreateKeyboard = false
|
||||
recreateKeyboard()
|
||||
}
|
||||
}
|
||||
|
||||
private var currentSubtype = ""
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
@ -284,9 +285,12 @@ class LatinIME : InputMethodService(), LifecycleOwner, ViewModelStoreOwner, Save
|
||||
}
|
||||
|
||||
if(activeSubtype != null) {
|
||||
if(activeSubtype != currentSubtype) {
|
||||
currentSubtype = activeSubtype
|
||||
changeInputMethodSubtype(Subtypes.convertToSubtype(activeSubtype))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onNewSubtype(getSetting(ActiveSubtype))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user