iOS: show more events in the "Next 7 days" widget
The per-day cap of 3 made busy days collapse to "+N" so only ~6-7 events showed total. Raise it (25) and let the total-row cap govern; extraLarge fills up to 40 rows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -511,7 +511,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.5;
|
||||
MARKETING_VERSION = 2.6;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.scarriffleservices.calendarr.ios;
|
||||
PRODUCT_NAME = "Calendarr iOS";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
@@ -555,7 +555,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.5;
|
||||
MARKETING_VERSION = 2.6;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.scarriffleservices.calendarr.ios;
|
||||
PRODUCT_NAME = "Calendarr iOS";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
|
||||
@@ -3,15 +3,20 @@ import WidgetKit
|
||||
|
||||
private let rowHeight: CGFloat = 16
|
||||
private let dayHeaderHeight: CGFloat = 14
|
||||
private let maxEventsPerDay: Int = 3
|
||||
private let maxTotalRows: Int = 22
|
||||
// Show all events of a day (the total-row cap below governs how much fits);
|
||||
// a low per-day cap previously made busy days collapse to "+N" far too early.
|
||||
private let maxEventsPerDay: Int = 25
|
||||
|
||||
struct UpcomingWidgetView: View {
|
||||
let entry: CalendarrEntry
|
||||
@Environment(\.widgetFamily) private var family
|
||||
|
||||
private var snapshot: WidgetSnapshot? { entry.snapshot }
|
||||
private var lang: String { snapshot?.language ?? "system" }
|
||||
|
||||
// Fill the available height: extraLarge (iPad) fits far more rows.
|
||||
private var maxTotalRows: Int { family == .systemExtraLarge ? 40 : 22 }
|
||||
|
||||
private var groupedWithLimits: [(Date, [WidgetEvent], Int)] {
|
||||
guard let s = snapshot else { return [] }
|
||||
let cal = Calendar.current
|
||||
|
||||
Reference in New Issue
Block a user