diff --git a/app/src/main/java/helium314/keyboard/latin/App.kt b/app/src/main/java/helium314/keyboard/latin/App.kt index 089f8ebc..c265bd78 100644 --- a/app/src/main/java/helium314/keyboard/latin/App.kt +++ b/app/src/main/java/helium314/keyboard/latin/App.kt @@ -111,19 +111,17 @@ fun checkVersionUpgrade(context: Context) { if (additionalSubtypeString.contains(".")) { // means there are custom layouts val subtypeStrings = additionalSubtypeString.split(";") val newSubtypeStrings = subtypeStrings.mapNotNull { + if ("." !in it) // not a custom subtype, nothing to do + return@mapNotNull it val split = it.split(":").toMutableList() - Log.i("test", "0: $it") if (split.size < 2) return@mapNotNull null // should never happen val oldName = split[1] val newName = oldName.substringBeforeLast(".") + "." if (oldName == newName) return@mapNotNull split.joinToString(":") // should never happen val oldFile = getCustomLayoutFile(oldName, context) val newFile = getCustomLayoutFile(newName, context) - Log.i("test", "1") if (!oldFile.exists()) return@mapNotNull null // should never happen - Log.i("test", "2") if (newFile.exists()) newFile.delete() // should never happen - Log.i("test", "3") oldFile.renameTo(newFile) val enabledSubtypes = prefs.getString(Settings.PREF_ENABLED_SUBTYPES, "")!! if (enabledSubtypes.contains(oldName)) diff --git a/layouts.md b/layouts.md index 58755e49..f5811941 100644 --- a/layouts.md +++ b/layouts.md @@ -37,7 +37,7 @@ If the layout has exactly 2 keys in the bottom row, these keys will replace comm * `shift_state_selector`: keys for `unshifted`, `shifted`, `shiftedManual`, `shiftedAutomatic`, `capsLock`, `manualOrLocked`, `default` (all optional) * `variation_selector`: keys for input types `datetime`, `time`, `date`, `password`, `normal`, `uri`, `email`, `default` (all optional) * `keyboard_state_selector`: keys for `emojiKeyEnabled`, `languageKeyEnabled`, `symbols`, `moreSymbols`, `alphabet`, `default` (all optional) - * the `keyEnabled` keys will be used if the corresponding setting is enabled, `symbols`, `moreSymbols`, `alphabet` will be used when the said keyboard view is active + * the `KeyEnabled` keys will be used if the corresponding setting is enabled, `symbols`, `moreSymbols`, `alphabet` will be used when the said keyboard view is active * `layout_direction_selector`: keys for `ltr` and `rtl` (both mandatory) ### Properties * A (non-selector) key can have the following properties: