mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-11 00:49:33 +00:00
change subtypeSettings to object, so it's clear which init is called
This commit is contained in:
parent
6e77437ea9
commit
2c1d6a5f4c
20 changed files with 283 additions and 287 deletions
|
@ -12,11 +12,11 @@ object LayoutUtils {
|
|||
if (layoutType != LayoutType.MAIN)
|
||||
return context.assets.list(layoutType.folder)?.map { it.substringBefore(".") }.orEmpty()
|
||||
if (locale == null)
|
||||
return getAllAvailableSubtypes().mapTo(HashSet()) { it.mainLayoutName()?.substringBefore("+") ?: "qwerty" }
|
||||
return SubtypeSettings.getAllAvailableSubtypes().mapTo(HashSet()) { it.mainLayoutName()?.substringBefore("+") ?: "qwerty" }
|
||||
if (locale.script() == ScriptUtils.SCRIPT_LATIN)
|
||||
return getAllAvailableSubtypes().filter { it.isAsciiCapable && !LayoutUtilsCustom.isCustomLayout(it.mainLayoutName() ?: "qwerty") }
|
||||
return SubtypeSettings.getAllAvailableSubtypes().filter { it.isAsciiCapable && !LayoutUtilsCustom.isCustomLayout(it.mainLayoutName() ?: "qwerty") }
|
||||
.mapTo(HashSet()) { it.mainLayoutName()?.substringBefore("+") ?: "qwerty" }
|
||||
return getSubtypesForLocale(locale).mapNotNullTo(HashSet()) { it.mainLayoutName() }
|
||||
return SubtypeSettings.getSubtypesForLocale(locale).mapNotNullTo(HashSet()) { it.mainLayoutName() }
|
||||
}
|
||||
|
||||
fun getLMainLayoutsForLocales(locales: List<Locale>, context: Context): Collection<String> =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue