Skip to content

Commit

Permalink
flag,unflag: fix -a option for the answered flag
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Robin Jarry <[email protected]>
  • Loading branch information
konimarti authored and rjarry committed Nov 24, 2023
1 parent 8ee6177 commit c761214
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions commands/msg/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c761214

Please sign in to comment.