fix anzeige Termine
This commit is contained in:
@@ -171,13 +171,17 @@ class CalendarStore {
|
|||||||
return cs <= start && ce >= end
|
return cs <= start && ce >= end
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fast in-memory refresh of `events` for the current visible range.
|
/// Republish the full cached event set, applying only visibility filters
|
||||||
/// Call this after navigation without hitting the network.
|
/// (hidden + banished). We deliberately do NOT slice by the current view's
|
||||||
|
/// date window: the user's chosen cache range is already loaded, and
|
||||||
|
/// scrolling within it must not make events vanish. Per-day / per-range
|
||||||
|
/// rendering is the responsibility of `events(on:)` / `events(in:)`.
|
||||||
|
/// `start` / `end` are kept in the signature for call-site clarity.
|
||||||
func refreshFromCache(start: Date, end: Date) {
|
func refreshFromCache(start: Date, end: Date) {
|
||||||
|
_ = (start, end)
|
||||||
events = allCachedEvents.filter { ev in
|
events = allCachedEvents.filter { ev in
|
||||||
let key = Self.calendarKey(source: ev.source, calendarId: ev.calendarId)
|
let key = Self.calendarKey(source: ev.source, calendarId: ev.calendarId)
|
||||||
return ev.startDate < end && ev.endDate > start
|
return !hiddenCalendarKeys.contains(key)
|
||||||
&& !hiddenCalendarKeys.contains(key)
|
|
||||||
&& !banishedCalendarKeys.contains(key)
|
&& !banishedCalendarKeys.contains(key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user