Ensure that flags are set properly
The current implementation has three classes of flags: - readFlag - delFlag - flaggedFlag The logic to check for them should be in parallel if branches rather than in sequential if-else ladder.
This commit is contained in:
parent
ab79bc3447
commit
1b7790553e
|
@ -177,10 +177,12 @@ func ParseIndexFormat(conf *config.AercConfig, number int,
|
||||||
readFlag = "N" // message is new
|
readFlag = "N" // message is new
|
||||||
} else if flag == imap.AnsweredFlag {
|
} else if flag == imap.AnsweredFlag {
|
||||||
readFlag = "r" // message has been replied to
|
readFlag = "r" // message has been replied to
|
||||||
} else if flag == imap.DeletedFlag {
|
}
|
||||||
|
if flag == imap.DeletedFlag {
|
||||||
delFlag = "D"
|
delFlag = "D"
|
||||||
// TODO: check if attachments
|
// TODO: check if attachments
|
||||||
} else if flag == imap.FlaggedFlag {
|
}
|
||||||
|
if flag == imap.FlaggedFlag {
|
||||||
flaggedFlag = "!"
|
flaggedFlag = "!"
|
||||||
}
|
}
|
||||||
// TODO: check gpg stuff
|
// TODO: check gpg stuff
|
||||||
|
|
Loading…
Reference in New Issue