Skip to content

Commit

Permalink
feat: Redirection into inbox after delete
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptGrv committed Nov 1, 2024
1 parent 23b8a43 commit 2c5c6b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Mail/Views/Menu Drawer/Folders/FoldersListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ struct FoldersListView: View {
try await mailboxManager.deleteFolder(
folder: folder.frozenContent
)

if mainViewState.selectedFolder.remoteId == folder.frozenContent.remoteId,
let inbox = mailboxManager.getFolder(with: .inbox)?.freezeIfNeeded() {
mainViewState.selectedFolder = inbox
}
} catch {
print(error)
}
Expand Down

0 comments on commit 2c5c6b7

Please sign in to comment.