mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-11 00:49:33 +00:00
put LayoutUtilsCustom into an object
This commit is contained in:
parent
a3e85bc664
commit
aa3bf37852
20 changed files with 305 additions and 326 deletions
|
@ -14,7 +14,7 @@ object LayoutUtils {
|
|||
if (locale == null)
|
||||
return getAllAvailableSubtypes().mapTo(HashSet()) { it.mainLayoutName()?.substringBefore("+") ?: "qwerty" }
|
||||
if (locale.script() == ScriptUtils.SCRIPT_LATIN)
|
||||
return getAllAvailableSubtypes().filter { it.isAsciiCapable && it.mainLayoutName()?.startsWith(CUSTOM_LAYOUT_PREFIX) == false }
|
||||
return getAllAvailableSubtypes().filter { it.isAsciiCapable && LayoutUtilsCustom.isCustomLayout(it.mainLayoutName() ?: "qwerty") }
|
||||
.mapTo(HashSet()) { it.mainLayoutName()?.substringBefore("+") ?: "qwerty" }
|
||||
return getSubtypesForLocale(locale).mapNotNullTo(HashSet()) { it.mainLayoutName() }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue