fix(#143): give the named title a fresh key, keep docs in step
This commit is contained in:
1 parent
2eeabb40c8
commit
613ddfb532
6 files changed
+9
-8
No files matched your search
@@ -203,7 +203,7 @@ fun CalendarHost(
|
||||
var detailKey by rememberSaveable { mutableStateOf<LongArray?>(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>” 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) }
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -969,7 +969,7 @@
|
||||
<string name="calendars_hidden_in">Hidden in %1$s</string>
|
||||
<string name="filter_hidden_in_view">Hidden in this view</string>
|
||||
<!-- %1$s is the view's name as the view switcher shows it, e.g. "Month" or "3 days". -->
|
||||
<string name="view_calendars_title">Hide in “%1$s” view</string>
|
||||
<string name="view_hide_in_title">Hide in “%1$s” view</string>
|
||||
<plurals name="drawer_hidden_in_view_count">
|
||||
<item quantity="one">%d calendar hidden in this view</item>
|
||||
<item quantity="other">%d calendars hidden in this view</item>
|
||||
|
||||
@@ -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>” 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
|
||||
|
||||
Reference in new issue
Block a user