From f6f3e2c048c32da505e30979e8d0b531e3eddf17 Mon Sep 17 00:00:00 2001 From: Philippe Weidmann Date: Wed, 29 May 2024 16:08:01 +0200 Subject: [PATCH] fix: Ensure Sentry user is set earlier to detect migration issues --- .../NotificationViewController.swift | 2 +- MailNotificationServiceExtension/NotificationService.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MailNotificationContentExtension/NotificationViewController.swift b/MailNotificationContentExtension/NotificationViewController.swift index a95c88840..3a3287d59 100644 --- a/MailNotificationContentExtension/NotificationViewController.swift +++ b/MailNotificationContentExtension/NotificationViewController.swift @@ -37,8 +37,8 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi override func viewDidLoad() { super.viewDidLoad() - ModelMigrator().migrateRealmIfNeeded() SentryDebug.setUserId(accountManager.currentUserId) + ModelMigrator().migrateRealmIfNeeded() activityIndicator.translatesAutoresizingMaskIntoConstraints = false activityIndicator.hidesWhenStopped = true diff --git a/MailNotificationServiceExtension/NotificationService.swift b/MailNotificationServiceExtension/NotificationService.swift index c5c0383cc..49e6232b7 100644 --- a/MailNotificationServiceExtension/NotificationService.swift +++ b/MailNotificationServiceExtension/NotificationService.swift @@ -38,8 +38,8 @@ final class NotificationService: UNNotificationServiceExtension { override init() { super.init() - ModelMigrator().migrateRealmIfNeeded() SentryDebug.setUserId(accountManager.currentUserId) + ModelMigrator().migrateRealmIfNeeded() } func prepareEmptyMessageNotification(in mailbox: Mailbox) {