Skip to content

Commit fdf3bcf

Browse files
committed
Fix broken Google Calendar onboarding
1 parent 3737c2e commit fdf3bcf

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

MeetingBar.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@
453453
CODE_SIGN_IDENTITY = "Apple Development";
454454
CODE_SIGN_STYLE = Automatic;
455455
COMBINE_HIDPI_IMAGES = YES;
456-
CURRENT_PROJECT_VERSION = 166;
456+
CURRENT_PROJECT_VERSION = 167;
457457
DEAD_CODE_STRIPPING = YES;
458458
DEVELOPMENT_ASSET_PATHS = "";
459459
ENABLE_HARDENED_RUNTIME = YES;
@@ -467,7 +467,7 @@
467467
"@executable_path/../Frameworks",
468468
);
469469
MACOSX_DEPLOYMENT_TARGET = 12.0;
470-
MARKETING_VERSION = 4.11.3;
470+
MARKETING_VERSION = 4.11.4;
471471
PRODUCT_BUNDLE_IDENTIFIER = leits.MeetingBar;
472472
PRODUCT_NAME = "$(TARGET_NAME)";
473473
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -483,7 +483,7 @@
483483
CODE_SIGN_IDENTITY = "Apple Development";
484484
CODE_SIGN_STYLE = Automatic;
485485
COMBINE_HIDPI_IMAGES = YES;
486-
CURRENT_PROJECT_VERSION = 166;
486+
CURRENT_PROJECT_VERSION = 167;
487487
DEAD_CODE_STRIPPING = YES;
488488
DEVELOPMENT_ASSET_PATHS = "";
489489
ENABLE_HARDENED_RUNTIME = YES;
@@ -497,7 +497,7 @@
497497
"@executable_path/../Frameworks",
498498
);
499499
MACOSX_DEPLOYMENT_TARGET = 12.0;
500-
MARKETING_VERSION = 4.11.3;
500+
MARKETING_VERSION = 4.11.4;
501501
PRODUCT_BUNDLE_IDENTIFIER = leits.MeetingBar;
502502
PRODUCT_NAME = "$(TARGET_NAME)";
503503
PROVISIONING_PROFILE_SPECIFIER = "";

MeetingBar/App/AppDelegate.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, @preconcurrency UNUserNotifi
4343

4444
statusBarItem = StatusBarItemController()
4545

46+
NSAppleEventManager.shared().setEventHandler(
47+
self,
48+
andSelector: #selector(AppDelegate.handleURLEvent(getURLEvent:replyEvent:)),
49+
forEventClass: AEEventClass(kInternetEventClass),
50+
andEventID: AEEventID(kAEGetURL)
51+
)
52+
4653
if Defaults[.onboardingCompleted] {
4754
Task {
4855
eventManager = await EventManager()
@@ -56,13 +63,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, @preconcurrency UNUserNotifi
5663
func setup() {
5764
statusBarItem.setAppDelegate(appdelegate: self)
5865

59-
NSAppleEventManager.shared().setEventHandler(
60-
self,
61-
andSelector: #selector(AppDelegate.handleURLEvent(getURLEvent:replyEvent:)),
62-
forEventClass: AEEventClass(kInternetEventClass),
63-
andEventID: AEEventID(kAEGetURL)
64-
)
65-
6666
UNUserNotificationCenter.current().delegate = self
6767
Task { @MainActor in
6868
await ensureNotificationAuthorization()

MeetingBar/UI/Views/Onboarding/AccessScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ struct AccessScreen: View {
9090
Defaults[.eventStoreProvider] = provider
9191
if let app = NSApplication.shared.delegate as! AppDelegate? {
9292
app.eventManager = await EventManager()
93-
await app.eventManager.changeEventStoreProvider(Defaults[.eventStoreProvider])
9493
Defaults[.onboardingCompleted] = true
9594
app.setup()
95+
await app.eventManager.changeEventStoreProvider(Defaults[.eventStoreProvider])
9696
self.viewRouter.currentScreen = .calendars
9797
}
9898
}

0 commit comments

Comments
 (0)