msglist: remove invalidate from commands which remove messages

Archive, delete, and move all remove messages from the message store.
The commands themselves invalidated the message list. The message list
was also invalidated for every MessagesDeleted message received. Remove
the call in the command logic to reduce redraws of the message list

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Tim Culverhouse 2022-07-31 09:41:22 -05:00 committed by Robin Jarry
parent 894668aec2
commit 0c85b5a6cf
3 changed files with 0 additions and 7 deletions

View file

@ -58,7 +58,6 @@ func (Archive) Execute(aerc *widgets.Aerc, args []string) error {
uids = append(uids, msg.Uid)
}
store.ClearVisualMark()
acct.Messages().Invalidate()
findNextNonDeleted(uids, store)
var uidMap map[string][]uint32

View file

@ -78,7 +78,6 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
acct.Messages().Select(0)
}
}
acct.Messages().Invalidate()
case *types.Error:
store.Remark()
aerc.PushError(msg.Error.Error())

View file

@ -53,16 +53,11 @@ func (Move) Execute(aerc *widgets.Aerc, args []string) error {
if err != nil {
return err
}
acct, err := h.account()
if err != nil {
return err
}
_, isMsgView := h.msgProvider.(*widgets.MessageViewer)
if isMsgView {
aerc.RemoveTab(h.msgProvider)
}
store.ClearVisualMark()
acct.Messages().Invalidate()
findNextNonDeleted(uids, store)
joinedArgs := strings.Join(args[optind:], " ")
store.Move(uids, joinedArgs, createParents, func(