fix(#493): review - live date in the numbering preview, pref round-trip test
This commit is contained in:
1 parent
70a20b07dc
commit
40863ed126
2 files changed
+9
-1
No files matched your search
@@ -353,7 +353,7 @@ internal fun ViewsScreen(
|
||||
}
|
||||
if (showWeekNumbering) {
|
||||
val firstDay = state.weekStart.resolveFirstDay(currentLocale())
|
||||
val rowStart = remember(firstDay) { currentDate().startOfWeek(firstDay) }
|
||||
val rowStart = currentDate().startOfWeek(firstDay)
|
||||
val region = remember { Resources.getSystem().configuration.locales[0] }
|
||||
OptionPicker(
|
||||
title = stringResource(R.string.settings_week_numbering),
|
||||
|
||||
@@ -162,6 +162,14 @@ class SettingsPrefsTest {
|
||||
assertThat(prefs.showWeekNumbers.first()).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `week numbering defaults to automatic and round-trips`(@TempDir tempDir: Path) = runTest {
|
||||
val prefs = testSettings(tempDir)
|
||||
assertThat(prefs.weekNumbering.first()).isEqualTo(WeekNumberingPref.AUTO)
|
||||
prefs.setWeekNumbering(WeekNumberingPref.US)
|
||||
assertThat(prefs.weekNumbering.first()).isEqualTo(WeekNumberingPref.US)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `month start times default on and round-trips`(@TempDir tempDir: Path) = runTest {
|
||||
val prefs = testSettings(tempDir)
|
||||
|
||||
Reference in new issue
Block a user