Show (no messages) for empty folders

This commit is contained in:
Drew DeVault 2019-04-04 14:25:51 -04:00
parent 60627c96f5
commit 8a42dfc87c
1 changed files with 6 additions and 0 deletions

View File

@ -89,6 +89,12 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
row += 1
}
if len(ml.store.Uids) == 0 {
msg := "(no messages)"
ctx.Printf((ctx.Width()/2)-(len(msg)/2), 0,
tcell.StyleDefault, "%s", msg)
}
if len(needsHeaders) != 0 {
ml.store.FetchHeaders(needsHeaders, nil)
ml.spinner.Start()