diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-07-31 09:41:22 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-08-01 10:37:44 +0200 |
commit | 0c85b5a6cfdae0cbe1d82cc958231e70888bf09f (patch) | |
tree | a3a1ede973131f6a02ea94837af04f28ab27e9bb | |
parent | 894668aec26502f0f17b4afff7aa7fc476710a2f (diff) | |
download | aerc-0c85b5a6cfdae0cbe1d82cc958231e70888bf09f.tar.gz |
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>
-rw-r--r-- | commands/msg/archive.go | 1 | ||||
-rw-r--r-- | commands/msg/delete.go | 1 | ||||
-rw-r--r-- | commands/msg/move.go | 5 |
3 files changed, 0 insertions, 7 deletions
diff --git a/commands/msg/archive.go b/commands/msg/archive.go index c4f06a3b..d4ad8f91 100644 --- a/commands/msg/archive.go +++ b/commands/msg/archive.go @@ -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 diff --git a/commands/msg/delete.go b/commands/msg/delete.go index d90132aa..7cf81138 100644 --- a/commands/msg/delete.go +++ b/commands/msg/delete.go @@ -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()) diff --git a/commands/msg/move.go b/commands/msg/move.go index b42a9847..b13e94ac 100644 --- a/commands/msg/move.go +++ b/commands/msg/move.go @@ -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( |