diff options
-rw-r--r-- | widgets/msglist.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go index 626f4c97..1ed6bb15 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -123,11 +123,15 @@ func (ml *MessageList) Draw(ctx *ui.Context) { } ctx.Fill(0, row, textWidth, 1, ' ', style) - uiConfig := ml.conf.GetUiConfig(map[config.ContextType]string{ + + confParams := map[config.ContextType]string{ config.UI_CONTEXT_ACCOUNT: ml.aerc.SelectedAccount().AccountConfig().Name, config.UI_CONTEXT_FOLDER: ml.aerc.SelectedAccount().Directories().Selected(), - config.UI_CONTEXT_SUBJECT: msg.Envelope.Subject, - }) + } + if msg.Envelope != nil { + confParams[config.UI_CONTEXT_SUBJECT] = msg.Envelope.Subject + } + uiConfig := ml.conf.GetUiConfig(confParams) fmtStr, args, err := format.ParseMessageFormat( ml.aerc.SelectedAccount().acct.From, |