mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Application: pass AppDelegate in initializer, instead of using singleton
This commit is contained in:
committed by
Stefan Ceriu
parent
ee0539f260
commit
718e01f3bc
@@ -24,12 +24,9 @@ enum AppDelegateCallback {
|
||||
}
|
||||
|
||||
class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
private(set) static var shared: AppDelegate!
|
||||
let callbacks = PassthroughSubject<AppDelegateCallback, Never>()
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
||||
// worst singleton ever
|
||||
Self.shared = self
|
||||
NSTextAttachment.registerViewProviderClass(PillAttachmentViewProvider.self, forFileType: InfoPlistReader.main.pillsUTType)
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user