From 9421489eb779d0a7f27bc64d143d7b75b824c0ea Mon Sep 17 00:00:00 2001 From: Philippe Weidmann Date: Fri, 12 May 2023 08:18:38 +0200 Subject: [PATCH] fix: Init InfomaniakNotifications for DI in NotificationService --- MailNotificationServiceExtension/NotificationService.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MailNotificationServiceExtension/NotificationService.swift b/MailNotificationServiceExtension/NotificationService.swift index ef7d558be..1c7369a6e 100644 --- a/MailNotificationServiceExtension/NotificationService.swift +++ b/MailNotificationServiceExtension/NotificationService.swift @@ -19,6 +19,7 @@ import InfomaniakCore import InfomaniakDI import InfomaniakLogin +import InfomaniakNotifications import MailCore import MailResources import RealmSwift @@ -40,10 +41,14 @@ class NotificationService: UNNotificationServiceExtension { let keychainHelper = Factory(type: KeychainHelper.self) { _, _ in KeychainHelper(accessGroup: AccountManager.accessGroup) } + let notificationService = Factory(type: InfomaniakNotifications.self) { _, _ in + InfomaniakNotifications() + } SimpleResolver.sharedResolver.store(factory: networkLoginService) SimpleResolver.sharedResolver.store(factory: loginService) SimpleResolver.sharedResolver.store(factory: keychainHelper) + SimpleResolver.sharedResolver.store(factory: notificationService) } func fetchMessage(uid: String, in mailboxManager: MailboxManager) async throws -> Message? {