diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-07-26 11:30:26 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-07-26 11:34:19 +0200 |
commit | 8f7695fde5cd84b7f6b8f3193270eda2fd62448c (patch) | |
tree | 27d2b58969b841f957fdbb8ad703f3d116eb5f9c /commands/msg/delete.go | |
parent | 3b90b3b0ddfd8134daa1d417bdd7acd8c39781b7 (diff) | |
download | aerc-8f7695fde5cd84b7f6b8f3193270eda2fd62448c.tar.gz |
msgstore: implement a uid-based architecture
Change the message store architecture from an index-based to a uid-based
one. Key advantage of this design approach is that no reselect mechanism
is required anymore since it comes with the design for free.
Fixes: https://todo.sr.ht/~rjarry/aerc/43
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg/delete.go')
-rw-r--r-- | commands/msg/delete.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/msg/delete.go b/commands/msg/delete.go index 2d7ad0f2..d1443887 100644 --- a/commands/msg/delete.go +++ b/commands/msg/delete.go @@ -56,7 +56,7 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error { // no more messages in the list if next == nil { aerc.RemoveTab(h.msgProvider) - store.Select(len(store.Uids())) + acct.Messages().Select(0) acct.Messages().Invalidate() return } @@ -74,7 +74,7 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error { if next == nil { // We deleted the last message, select the new last message // instead of the first message - store.Select(len(store.Uids())) + acct.Messages().Select(0) } } acct.Messages().Invalidate() |