diff options
Diffstat (limited to 'lib/state')
-rw-r--r-- | lib/state/templates.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/state/templates.go b/lib/state/templates.go index ac701e9f..d039f1b6 100644 --- a/lib/state/templates.go +++ b/lib/state/templates.go @@ -393,6 +393,9 @@ func (d *templateData) Flags() []string { default: flags = append(flags, d.ui().IconOld) // message is unread and old } + if d.info.Flags.Has(models.DraftFlag) { + flags = append(flags, d.ui().IconDraft) + } if d.info.Flags.Has(models.DeletedFlag) { flags = append(flags, d.ui().IconDeleted) } @@ -452,6 +455,13 @@ func (d *templateData) IsFlagged() bool { return false } +func (d *templateData) IsDraft() bool { + if d.info != nil && d.info.Flags.Has(models.DraftFlag) { + return true + } + return false +} + func (d *templateData) IsMarked() bool { return d.marked } |