mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Application: pass AppDelegate in initializer, instead of using singleton
This commit is contained in:
committed by
Stefan Ceriu
parent
ee0539f260
commit
718e01f3bc
@@ -20,7 +20,7 @@ import SwiftUI
|
||||
struct Application: App {
|
||||
@UIApplicationDelegateAdaptor(AppDelegate.self) private var applicationDelegate
|
||||
@Environment(\.openURL) private var openURL
|
||||
private let appCoordinator: AppCoordinatorProtocol
|
||||
private var appCoordinator: AppCoordinatorProtocol!
|
||||
|
||||
init() {
|
||||
if ProcessInfo.isRunningUITests {
|
||||
@@ -28,7 +28,7 @@ struct Application: App {
|
||||
} else if ProcessInfo.isRunningUnitTests {
|
||||
appCoordinator = UnitTestsAppCoordinator()
|
||||
} else {
|
||||
appCoordinator = AppCoordinator()
|
||||
appCoordinator = AppCoordinator(appDelegate: applicationDelegate)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ struct Application: App {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private var shouldHideStatusBar: Bool {
|
||||
ProcessInfo.isRunningUITests
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user