Add support for different calendar systems, add secondary calendar

This commit is contained in:
MM20
2026-03-06 19:36:58 +01:00
parent f281efb5d7
commit 77eb927ab2
29 changed files with 504 additions and 139 deletions

View File

@@ -202,6 +202,16 @@ data class LauncherSettingsData internal constructor(
*/
val localeTransliterator: String? = "",
/**
* The ICU id of the primary calendar. `null` to use the default.
*/
val localePrimaryCalendar: String? = null,
/**
* The ICU id of the secondary calendar. `null` to disable.
*/
val localeSecondaryCalendar: String? = null,
val feedProviderPackage: String? = null

View File

@@ -35,4 +35,22 @@ class LocaleSettings internal constructor(
it.copy(localeTransliterator = transliterator)
}
}
val primaryCalendar
get() = launcherDataStore.data.map { it.localePrimaryCalendar }
fun setPrimaryCalendar(primaryCalendar: String?) {
launcherDataStore.update {
it.copy(localePrimaryCalendar = primaryCalendar)
}
}
val secondaryCalendar
get() = launcherDataStore.data.map { it.localeSecondaryCalendar }
fun setSecondaryCalendar(secondaryCalendar: String?) {
launcherDataStore.update {
it.copy(localeSecondaryCalendar = secondaryCalendar)
}
}
}