diff --git a/Mail/Views/New Message/ComposeMessageView.swift b/Mail/Views/New Message/ComposeMessageView.swift index 11e20f13f..a7cae5ee3 100644 --- a/Mail/Views/New Message/ComposeMessageView.swift +++ b/Mail/Views/New Message/ComposeMessageView.swift @@ -316,7 +316,10 @@ struct ComposeMessageView: View { sendDraft() if !Bundle.main.isExtension { - mainViewState.isShowingSetAppAsDefaultDiscovery = UserDefaults.shared.shouldPresentSetAsDefaultDiscovery + // We should implement a proper router to avoid doing this + DispatchQueue.main.asyncAfter(deadline: UIConstants.modalCloseDelay) { + mainViewState.isShowingSetAppAsDefaultDiscovery = UserDefaults.shared.shouldPresentSetAsDefaultDiscovery + } if !mainViewState.isShowingSetAppAsDefaultDiscovery { mainViewState.isShowingChristmasEasterEgg = true } diff --git a/MailCore/UI/UIConstants.swift b/MailCore/UI/UIConstants.swift index 8c3104e18..0b75e7f45 100644 --- a/MailCore/UI/UIConstants.swift +++ b/MailCore/UI/UIConstants.swift @@ -116,6 +116,10 @@ public extension UIConstants { public extension UIConstants { static let checkboxAppearDelay = 0.2 static let checkboxDisappearOffsetDelay = 0.35 + + static var modalCloseDelay: DispatchTime { + DispatchTime.now() + 0.75 + } } // MARK: - Utils