From ea2646fc039a572491ba8cc8e2879b7bf61c25dd Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sat, 9 May 2020 11:50:31 +0200 Subject: Change MarkedMessages to return uids Especially if one tries to interact with all marked messages there could be the case that not all headers are fetched yet, hence the messageInfo is still nil. This segfaults a lot of commands which in principle only need the uid to complete. If we switch to uids, this issue can be alleviated for those commands. --- widgets/msgviewer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'widgets/msgviewer.go') diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index e192ae6a..0cfabd7f 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -262,9 +262,9 @@ func (mv *MessageViewer) SelectedMessage() (*models.MessageInfo, error) { return mv.msg.MessageInfo(), nil } -func (mv *MessageViewer) MarkedMessages() ([]*models.MessageInfo, error) { +func (mv *MessageViewer) MarkedMessages() ([]uint32, error) { store := mv.Store() - return msgInfoFromUids(store, store.Marked()) + return store.Marked(), nil } func (mv *MessageViewer) ToggleHeaders() { -- cgit