Skip to content

Commit 19b62f5

Browse files
committed
fix: missing init values for LandscapeInputUIMode
Supply the initial values so it can correctly converting `String` to `enum`. Fix #930
1 parent 83c2f74 commit 19b62f5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/main/java/com/osfans/trime/ime/landscapeinput/LandscapeInputUIMode.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ enum class LandscapeInputUIMode {
1010
;
1111

1212
companion object {
13-
private val convertMap: HashMap<String, LandscapeInputUIMode> = hashMapOf()
13+
private val convertMap: HashMap<String, LandscapeInputUIMode> =
14+
hashMapOf(
15+
Pair("AUTO_SHOW", AUTO_SHOW),
16+
Pair("ALWAYS_SHOW", ALWAYS_SHOW),
17+
Pair("NEVER_SHOW", NEVER_SHOW),
18+
)
1419

1520
fun fromString(mode: String): LandscapeInputUIMode {
1621
val type = convertMap[mode.uppercase(Locale.getDefault())]

0 commit comments

Comments
 (0)