mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-22 22:36:01 +00:00
Don't create multiple ReceiveModels in AppDelegate
This commit is contained in:
1 parent
d367e0ff34
commit
bb1f28af0b
1 file changed
+5
@@ -133,6 +133,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
|||||||
|
|
||||||
|
|
||||||
func startReceiving() {
|
func startReceiving() {
|
||||||
|
guard receiveModel == nil else {
|
||||||
|
log("[AppDelegate] startReceiving called while receiver is already active. Ignoring duplicate call.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
receiveModel = ReceiveModel(controlPlusScreen: { shouldOpen in
|
receiveModel = ReceiveModel(controlPlusScreen: { shouldOpen in
|
||||||
if shouldOpen {
|
if shouldOpen {
|
||||||
self.openPlusScreen()
|
self.openPlusScreen()
|
||||||
|
|||||||
Reference in new issue
Block a user