mirror of
https://github.com/fcitx5-android/fcitx5-android.git
synced 2026-08-02 20:16:06 +08:00
adjust mainText on space
This commit is contained in:
parent
33a4d66343
commit
d5e676bf6f
@ -70,7 +70,10 @@ data class InputMethodEntry(
|
||||
constructor(name: String) : this("", name, "", "", "×", "", "", false)
|
||||
|
||||
val displayName: String
|
||||
get() = name.ifEmpty { uniqueName }
|
||||
get() = when {
|
||||
subMode.name.isNullOrEmpty() -> name.ifEmpty { uniqueName }
|
||||
else -> label.ifEmpty { name.ifEmpty { uniqueName } }
|
||||
}
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
|
||||
@ -167,7 +167,7 @@ class TextKeyboard(
|
||||
override fun onInputMethodUpdate(ime: InputMethodEntry) {
|
||||
space.mainText.text = buildString {
|
||||
append(ime.displayName)
|
||||
ime.subMode.run { label.ifEmpty { name.ifEmpty { null } } }?.let { append(" ($it)") }
|
||||
ime.subMode.run { name.ifEmpty { label.ifEmpty { null } } }?.let { append(" $it") }
|
||||
}
|
||||
if (capsState != CapsState.None) {
|
||||
switchCapsState()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user