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
|
// Called by UixManager when the intention is to subsequently call LegacyKeyboardView with hidden=false
|
||||||
// Maybe this can be changed to LaunchedEffect
|
// Maybe this can be changed to LaunchedEffect
|
||||||
fun onKeyboardShown() {
|
fun onKeyboardShown() {
|
||||||
//if(pendingRecreateKeyboard) {
|
if(pendingRecreateKeyboard) {
|
||||||
// pendingRecreateKeyboard = false
|
pendingRecreateKeyboard = false
|
||||||
// recreateKeyboard()
|
recreateKeyboard()
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var currentSubtype = ""
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
@ -284,7 +285,10 @@ class LatinIME : InputMethodService(), LifecycleOwner, ViewModelStoreOwner, Save
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(activeSubtype != null) {
|
if(activeSubtype != null) {
|
||||||
changeInputMethodSubtype(Subtypes.convertToSubtype(activeSubtype))
|
if(activeSubtype != currentSubtype) {
|
||||||
|
currentSubtype = activeSubtype
|
||||||
|
changeInputMethodSubtype(Subtypes.convertToSubtype(activeSubtype))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user