store: extract marking behavior and add tests
Separate the marking functions from the message store and extract the marking behavior into its own class with tests. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
ee961d3b1d
commit
cfc19a7ec2
14 changed files with 373 additions and 177 deletions
commands/msg
|
@ -57,7 +57,8 @@ func (Archive) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
for _, msg := range msgs {
|
||||
uids = append(uids, msg.Uid)
|
||||
}
|
||||
store.ClearVisualMark()
|
||||
marker := store.Marker()
|
||||
marker.ClearVisualMark()
|
||||
findNextNonDeleted(uids, store)
|
||||
|
||||
var uidMap map[string][]uint32
|
||||
|
@ -95,7 +96,7 @@ func (Archive) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
aerc.PushError(msg.Error.Error())
|
||||
success = false
|
||||
wg.Done()
|
||||
store.Remark()
|
||||
marker.Remark()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue