From 8c9af39299ec09ce457396998617aa0c4868b286 Mon Sep 17 00:00:00 2001 From: Drew Smirnoff Date: Tue, 21 Apr 2026 23:45:27 +0400 Subject: [PATCH] fix: load folders from cache (#826) --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 9a30a30c165db1b9db79e2b46d700390d64b9e4e..a453385bc1e7469dbdf1ab6d5b72678bb575c547 100644 --- a/main.go +++ b/main.go @@ -387,8 +387,9 @@ func (m *mainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } } } - if len(cachedFolders) == 0 { - cachedFolders = []string{"INBOX"} + // Always ensure INBOX is present, even if cache is empty or stale + if !seen["INBOX"] { + cachedFolders = append([]string{"INBOX"}, cachedFolders...) } m.folderInbox = tui.NewFolderInbox(cachedFolders, m.config.Accounts) m.folderInbox.SetDateFormat(m.config.GetDateFormat())