From bb1f28af0b221b3f7bb9047fe1ea6ca367d7959e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6ttger?= Date: Mon, 16 Feb 2026 19:43:42 +0100 Subject: [PATCH] Don't create multiple ReceiveModels in AppDelegate --- QuickDrop/AppDelegate.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/QuickDrop/AppDelegate.swift b/QuickDrop/AppDelegate.swift index a0bc8d9..19db3c4 100644 --- a/QuickDrop/AppDelegate.swift +++ b/QuickDrop/AppDelegate.swift @@ -133,6 +133,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele func startReceiving() { + guard receiveModel == nil else { + log("[AppDelegate] startReceiving called while receiver is already active. Ignoring duplicate call.") + return + } + receiveModel = ReceiveModel(controlPlusScreen: { shouldOpen in if shouldOpen { self.openPlusScreen()