diff --git a/deltachat-ios/AppDelegate.swift b/deltachat-ios/AppDelegate.swift index 3da948ca1..67f699a09 100644 --- a/deltachat-ios/AppDelegate.swift +++ b/deltachat-ios/AppDelegate.swift @@ -497,7 +497,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD UserDefaults.self.pushToDebugArray("ERR2") } - if !appIsInForeground() { + if !self.appIsInForeground() { UserDefaults.setMainIoRunning(false) // this also improves resilience: if we crashed before, NSE would never run otherwise } @@ -601,13 +601,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD let eventHandler = DcEventHandler(dcAccounts: self.dcAccounts) let eventEmitter = self.dcAccounts.getEventEmitter() logger.info("➡️ event emitter started") - while !shouldShutdownEventLoop { + while !self.shouldShutdownEventLoop { guard let event = eventEmitter.getNextEvent() else { break } eventHandler.handleEvent(event: event) } logger.info("⬅️ event emitter finished") - eventShutdownSemaphore.signal() - eventHandlerActive = false + self.eventShutdownSemaphore.signal() + self.eventHandlerActive = false } }