mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-16 04:12:02 +00:00
fix crash when deleting subtype
fixes GH-1476
This commit is contained in:
parent
8fddf94121
commit
fe7f1a1b38
1 changed files with 2 additions and 2 deletions
|
@ -13,9 +13,9 @@ enum class LayoutType {
|
|||
companion object {
|
||||
fun EnumMap<LayoutType, String>.toExtraValue() = map { it.key.name + Separators.KV + it.value }.joinToString(Separators.ENTRY)
|
||||
|
||||
fun getLayoutMap(string: String): EnumMap<LayoutType, String> {
|
||||
fun getLayoutMap(string: String?): EnumMap<LayoutType, String> {
|
||||
val map = EnumMap<LayoutType, String>(LayoutType::class.java)
|
||||
string.split(Separators.ENTRY).forEach {
|
||||
string?.split(Separators.ENTRY)?.forEach {
|
||||
val s = it.split(Separators.KV)
|
||||
runCatching { map[LayoutType.valueOf(s[0])] = s[1] }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue