Skip to content

Commit

Permalink
fix: Freeze folder before async
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Apr 30, 2024
1 parent 3aba2ba commit 0da989b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mail/Views/Thread List/FlushFolderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ struct FlushFolderView: View {

Button {
matomo.track(eventWithCategory: .threadList, name: "empty\(folder.matomoName.capitalized)")
let frozenFolder = folder.freezeIfNeeded()
flushAlert = FlushAlertState {
await tryOrDisplayError {
_ = try await mailboxManager.flushFolder(folder: folder.freezeIfNeeded())
_ = try await mailboxManager.flushFolder(folder: folder)
}
}
} label: {
Expand Down

0 comments on commit 0da989b

Please sign in to comment.