diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-08-08 22:21:43 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-08-22 09:30:37 +0200 |
commit | 16dbb9422120a2f229524f1cbee55f09e455b1d7 (patch) | |
tree | 6ee55215802e3993a4c628c3bbcde6d7a5068881 /commands/msg/utils.go | |
parent | 22e6c9e4fac70c9542d10464f88553c1f20ce577 (diff) | |
download | aerc-16dbb9422120a2f229524f1cbee55f09e455b1d7.tar.gz |
util: fetch message headers for nil messages
Fix large archive operations that covers messages in the store with
unfetched headers. Commit e5ad877af562 ("msgstore: fetch missing headers
in visual mode") fixed this for the visual selection mode but omitted
the case when 'mark -a' is used to mark all messages.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg/utils.go')
-rw-r--r-- | commands/msg/utils.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/commands/msg/utils.go b/commands/msg/utils.go index 4ce82a74..8a00a35e 100644 --- a/commands/msg/utils.go +++ b/commands/msg/utils.go @@ -2,6 +2,7 @@ package msg import ( "errors" + "time" "git.sr.ht/~rjarry/aerc/commands" "git.sr.ht/~rjarry/aerc/lib" @@ -11,10 +12,16 @@ import ( type helper struct { msgProvider widgets.ProvidesMessages + statusInfo func(string) } func newHelper(aerc *widgets.Aerc) *helper { - return &helper{aerc.SelectedTabContent().(widgets.ProvidesMessages)} + return &helper{ + msgProvider: aerc.SelectedTabContent().(widgets.ProvidesMessages), + statusInfo: func(s string) { + aerc.PushStatus(s, 10*time.Second) + }, + } } func (h *helper) markedOrSelectedUids() ([]uint32, error) { @@ -46,5 +53,5 @@ func (h *helper) messages() ([]*models.MessageInfo, error) { if err != nil { return nil, err } - return commands.MsgInfoFromUids(store, uid) + return commands.MsgInfoFromUids(store, uid, h.statusInfo) } |