diff options
author | Koni Marti <koni.marti@gmail.com> | 2023-11-24 20:39:46 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-11-24 22:45:03 +0100 |
commit | c76121437852abd312327925a50c1f7fe977afce (patch) | |
tree | 9b9988ad86c8df03a2a67f5cc072dd637f6ef5a8 /commands/msg | |
parent | 8ee61777ada29432783e18a7634ab1150a631987 (diff) | |
download | aerc-c76121437852abd312327925a50c1f7fe977afce.tar.gz |
flag,unflag: fix -a option for the answered flag
Fix the -a option to correctly set or unset the answered flag.
Fixes: https://todo.sr.ht/~rjarry/aerc/199
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg')
-rw-r--r-- | commands/msg/read.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/msg/read.go b/commands/msg/read.go index a92a4d0a..e682a156 100644 --- a/commands/msg/read.go +++ b/commands/msg/read.go @@ -65,6 +65,10 @@ func (f FlagMsg) Execute(args []string) error { f.Flag = models.SeenFlag f.FlagName = "seen" case "flag", "unflag": + if f.Answered { + f.Flag = models.AnsweredFlag + f.FlagName = "answered" + } if f.Flag == 0 { f.Flag = models.FlaggedFlag f.FlagName = "flagged" |