diff --git a/MailCore/Cache/AccountManager.swift b/MailCore/Cache/AccountManager.swift index 2a62a3116..83a2215c1 100644 --- a/MailCore/Cache/AccountManager.swift +++ b/MailCore/Cache/AccountManager.swift @@ -284,7 +284,7 @@ public class AccountManager: RefreshTokenDelegate { } MailboxInfosManager.instance.storeMailboxes(user: user, mailboxes: mailboxesResponse) - if let mainMailbox = mailboxesResponse.first(where: { $0.isPrimary }) ?? mailboxesResponse.first { + if let mainMailbox = (mailboxesResponse.first(where: { $0.isPrimary }) ?? mailboxesResponse.first)?.freezeIfNeeded() { await notificationService.updateTopicsIfNeeded([mainMailbox.notificationTopicName], userApiFetcher: apiFetcher) setCurrentMailboxForCurrentAccount(mailbox: mainMailbox) }