From 11b035f120969758d1b08dddd761f9375504de55 Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Thu, 25 Jan 2024 08:25:51 -0500 Subject: flags: add support for draft flag Support the draft flag wherever flags are used. Automatically set it when postponing a message, and allow recalling a message without the -f flag if it has the draft flag set, regardless of what folder it's in. Notmuch doesn't seem to pick up on the draft flag when indexing even though the flag is set on the maildir file. Explicitly set all tags corresponding to set flags when appending a message in notmuch. Changelog-added: Support the `draft` flag. Signed-off-by: Jason Cox Acked-by: Robin Jarry --- config/templates.go | 1 + config/ui.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/templates.go b/config/templates.go index c5d11478..61c411fb 100644 --- a/config/templates.go +++ b/config/templates.go @@ -94,6 +94,7 @@ func (d *dummyData) HasAttachment() bool { return true } func (d *dummyData) IsRecent() bool { return false } func (d *dummyData) IsUnread() bool { return false } func (d *dummyData) IsFlagged() bool { return false } +func (d *dummyData) IsDraft() bool { return false } func (d *dummyData) IsMarked() bool { return false } func (d *dummyData) MessageId() string { return "123456789@foo.org" } func (d *dummyData) Size() int { return 420 } diff --git a/config/ui.go b/config/ui.go index ed0b4a33..83b45230 100644 --- a/config/ui.go +++ b/config/ui.go @@ -55,9 +55,10 @@ type UIConfig struct { IconReplied string `ini:"icon-replied" default:"r"` IconNew string `ini:"icon-new" default:"N"` IconOld string `ini:"icon-old" default:"O"` + IconDraft string `ini:"icon-draft" default:"d"` IconFlagged string `ini:"icon-flagged" default:"!"` IconMarked string `ini:"icon-marked" default:"*"` - IconDeleted string `ini:"icon-deleted" default:"D"` + IconDeleted string `ini:"icon-deleted" default:"X"` DirListDelay time.Duration `ini:"dirlist-delay" default:"200ms"` DirListTree bool `ini:"dirlist-tree"` DirListCollapse int `ini:"dirlist-collapse"` -- cgit