diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt index a30ad787..771bd779 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt @@ -203,7 +203,7 @@ fun CalendarHost( var detailKey by rememberSaveable { mutableStateOf(null) } val onOpenDetail: (EventInstance) -> Unit = { event -> detailKey = event.occurrenceKey() } - // The drawer's "Hide in this view" picker (#517). It is its own window over + // The drawer's "Hide in “” view" picker (#517). It is its own window over // everything here, so each external request below closes it first. var showViewCalendars by rememberSaveable { mutableStateOf(false) } diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/CalendarView.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/CalendarView.kt index 7715ee27..5069306a 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/CalendarView.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/CalendarView.kt @@ -42,6 +42,10 @@ fun CalendarView.label(): String = when (this) { CalendarView.Agenda -> stringResource(R.string.view_agenda) } +/** "Hide in “Month” view": the per-view hide's drawer entry and picker title (#143). */ +@Composable +fun CalendarView.hideInViewTitle(): String = stringResource(R.string.view_hide_in_title, label()) + /** Leading icon for the view in the drawer's View section. */ val CalendarView.icon: ImageVector get() = when (this) { diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/filter/CalendarFilterList.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/filter/CalendarFilterList.kt index d64eefae..57781609 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/filter/CalendarFilterList.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/filter/CalendarFilterList.kt @@ -38,6 +38,7 @@ import de.jeanlucmakiola.calendula.ui.common.CalendarAccountGroup import de.jeanlucmakiola.calendula.ui.common.CalendarColorChip import de.jeanlucmakiola.calendula.ui.common.CalendarView import de.jeanlucmakiola.calendula.ui.common.accountGroupTitle +import de.jeanlucmakiola.calendula.ui.common.hideInViewTitle import de.jeanlucmakiola.calendula.ui.common.orUnnamed import de.jeanlucmakiola.floret.components.GroupedListInset import de.jeanlucmakiola.floret.components.GroupedRow diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/filter/ViewCalendarsPicker.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/filter/ViewCalendarsPicker.kt index 7f00bd3f..1303568d 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/filter/ViewCalendarsPicker.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/filter/ViewCalendarsPicker.kt @@ -12,17 +12,13 @@ import de.jeanlucmakiola.calendula.ui.common.CalendarColorChip import de.jeanlucmakiola.calendula.ui.common.CalendarView import de.jeanlucmakiola.calendula.ui.common.accountGroupTitle import de.jeanlucmakiola.calendula.ui.common.calendarsHiddenIn -import de.jeanlucmakiola.calendula.ui.common.label +import de.jeanlucmakiola.calendula.ui.common.hideInViewTitle import de.jeanlucmakiola.calendula.ui.common.orUnnamed import de.jeanlucmakiola.floret.components.FullScreenPicker import de.jeanlucmakiola.floret.components.GroupedHint import de.jeanlucmakiola.floret.components.GroupedSectionHeader import de.jeanlucmakiola.floret.components.MultiOptionRows -/** "Hide in “Month” view": the per-view hide's entry and picker title (#143). */ -@Composable -internal fun CalendarView.hideInViewTitle(): String = stringResource(R.string.view_calendars_title, label()) - /** * The calendars hidden in [view] (#517), opened from the drawer while on it: the * per-view setting from Settings → Calendars (#270), seen from the view's side. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 09820ccf..bc0027d3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -969,7 +969,7 @@ Hidden in %1$s Hidden in this view - Hide in “%1$s” view + Hide in “%1$s” view %d calendar hidden in this view %d calendars hidden in this view diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 9577384d..2a7f3e5b 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -420,7 +420,7 @@ separate in-app declutter that never touches reminders. Narrower still is the pe (`SettingsPrefs.perCalendarHiddenViews`, #270): each view model asks for its events through `instancesWithout(range, calendarsHiddenIn(view, …))`, which drops the calendars hidden in that one view on top of the repository's filters; reminders, search and widgets read -the repository and never see it. The drawer's "Hide in this view" entry (#517) edits the same +the repository and never see it. The drawer's "Hide in “” view" entry (#517, #143) edits the same set for the view on show, and the drawer's per-row "Hidden in this view" notes read it. **A channel per calendar (#145).** `ReminderChannels` keeps one notification