Skip to content

Commit

Permalink
fix: Ensure we load current user if it is null (#1557)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann authored Sep 27, 2024
2 parents a346792 + 7491369 commit 67303bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Mail/Views/PreloadingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ struct PreloadingView: View {

do {
if let targetMailboxManager = accountManager.currentMailboxManager {
if await accountManager.getCurrentUser() == nil {
try await accountManager.updateUser(for: currentAccount)
}

if targetMailboxManager.getFolder(with: .inbox) == nil {
try await targetMailboxManager.refreshAllFolders()
}
Expand Down

0 comments on commit 67303bd

Please sign in to comment.