Skip to content

Commit

Permalink
Merge pull request #746 from Infomaniak/fix-notification-service
Browse files Browse the repository at this point in the history
fix: Init InfomaniakNotifications for DI in NotificationService
  • Loading branch information
PhilippeWeidmann committed May 12, 2023
2 parents 9ef362c + 9421489 commit 634afe5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MailNotificationServiceExtension/NotificationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import InfomaniakCore
import InfomaniakDI
import InfomaniakLogin
import InfomaniakNotifications
import MailCore
import MailResources
import RealmSwift
Expand All @@ -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? {
Expand Down

0 comments on commit 634afe5

Please sign in to comment.