Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Calendar: ask the Mac to sync before reading, so an event added on the web shows within a minute

christianmata8993d9b0c5c
diff --git a/app/native/yogurt-mac/main.swift b/app/native/yogurt-mac/main.swift
index d8f2ba9c..14b42c5c 100644
--- a/app/native/yogurt-mac/main.swift
+++ b/app/native/yogurt-mac/main.swift
@@ -354,6 +354,9 @@ case "events":
needAccess()
guard args.count >= 3 else { fail("events FROM TO") }
let from = date(args[1]), to = date(args[2])
+ // ask the Mac to fetch new changes from Google, iCloud and Exchange now rather than on its own schedule (often
+ // 15 minutes); it syncs in the background, so an event added elsewhere shows on the next read, a minute later at most
+ store.refreshSourcesIfNecessary()
let found = store.events(matching: store.predicateForEvents(withStart: from, end: to, calendars: nil))
.filter { !$0.isAllDay && $0.status != .canceled }
.sorted { $0.startDate < $1.startDate }