mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Remove InputView parent to mitigate crash when changing keyboard size
This commit is contained in:
parent
a668a3c801
commit
da95c69668
@ -12,6 +12,7 @@ import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.KeyEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.inputmethod.CompletionInfo
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.view.inputmethod.InlineSuggestionsRequest
|
||||
@ -511,7 +512,9 @@ class LatinIME : InputMethodServiceCompose(), LatinIMELegacy.SuggestionStripCont
|
||||
|
||||
key(legacyInputView) {
|
||||
AndroidView(factory = {
|
||||
legacyInputView!!
|
||||
legacyInputView!!.also {
|
||||
if(it.parent != null) (it.parent as ViewGroup).removeView(it)
|
||||
}
|
||||
}, modifier = modifier, onRelease = {
|
||||
val view = it as InputView
|
||||
view.deallocateMemory()
|
||||
|
Loading…
Reference in New Issue
Block a user