Add support for different calendar systems, add secondary calendar
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user