Address review on the Calendula alignment (#66)
Bumps floret-kit so a closing screen stops taking back, returns from Storage to Import, and renames the per-list notifications row.
This commit is contained in:
@@ -81,11 +81,8 @@ fun AgendulaNavHost(
|
||||
navController = nav,
|
||||
startDestination = Dest.LISTS,
|
||||
modifier = modifier,
|
||||
// Calendula's overlay motion: only the screen on top moves. It slides in
|
||||
// over the held screen and leaves the way floret's predictiveBackExit
|
||||
// does. A back swipe seeks that exit, with the previous screen drawn
|
||||
// underneath — which only NavHost's own handler can do, so destinations
|
||||
// must not register a preview of their own.
|
||||
// Calendula's overlay motion. NavHost's own back handler seeks the exit
|
||||
// over the previous screen, so destinations don't add a preview of their own.
|
||||
enterTransition = { slideInHorizontally(slideSpec) { it } + fadeIn() },
|
||||
exitTransition = { ExitTransition.None },
|
||||
popEnterTransition = { EnterTransition.None },
|
||||
|
||||
@@ -74,7 +74,7 @@ internal enum class SettingsSection {
|
||||
Licences,
|
||||
;
|
||||
|
||||
/** Where back goes: export and import are opened from Backup, the account screens from Accounts. */
|
||||
/** The section that stays composed underneath: Backup under export and import, Accounts under its screens. */
|
||||
val parent: SettingsSection?
|
||||
get() = when (this) {
|
||||
Export, Import -> Backup
|
||||
@@ -109,6 +109,8 @@ fun SettingsScreen(
|
||||
else SettingsSection.entries.firstOrNull { it.name == initialSection },
|
||||
)
|
||||
}
|
||||
// Import's "open storage" comes back to Import rather than the hub.
|
||||
var storageReturn by rememberSaveable { mutableStateOf<SettingsSection?>(null) }
|
||||
|
||||
Box(
|
||||
modifier = modifier
|
||||
@@ -131,7 +133,14 @@ fun SettingsScreen(
|
||||
}
|
||||
val storage = section == SettingsSection.Storage
|
||||
SlideInSection(visible = storage) {
|
||||
StorageScreen(viewModel = viewModel, onBack = { section = null }, visible = storage)
|
||||
StorageScreen(
|
||||
viewModel = viewModel,
|
||||
onBack = {
|
||||
section = storageReturn
|
||||
storageReturn = null
|
||||
},
|
||||
visible = storage,
|
||||
)
|
||||
}
|
||||
// Backup stays composed under export and import, so the deeper screen slides over it.
|
||||
val backup = section == SettingsSection.Backup || section?.parent == SettingsSection.Backup
|
||||
@@ -151,7 +160,10 @@ fun SettingsScreen(
|
||||
SlideInSection(visible = importOpen) {
|
||||
ImportScreen(
|
||||
onBack = { section = SettingsSection.Backup },
|
||||
onOpenStorage = { section = SettingsSection.Storage },
|
||||
onOpenStorage = {
|
||||
storageReturn = SettingsSection.Import
|
||||
section = SettingsSection.Storage
|
||||
},
|
||||
predictiveBack = true,
|
||||
visible = importOpen,
|
||||
)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<string name="reminder_unit_weeks">Weeks</string>
|
||||
<string name="settings_list_reminders_title">Per-list reminders</string>
|
||||
<string name="settings_list_reminders_hint">Override the default per list — separately for timed and all-day tasks. A list can keep the default, drop it, or set its own.</string>
|
||||
<string name="settings_list_notifications">Notifications</string>
|
||||
<string name="settings_list_notifications">Sound & vibration</string>
|
||||
<string name="settings_list_notifications_hint">Sound, vibration and importance for this list’s reminders</string>
|
||||
<string name="settings_list_reminder_inherits">Default (%1$s)</string>
|
||||
|
||||
|
||||
+1
-1
Submodule floret-kit updated: 5093e1cc5f...da04428162
Reference in New Issue
Block a user