ea2646fc03
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.
29 lines
607 B
Go
29 lines
607 B
Go
package widgets
|
|
|
|
import (
|
|
"git.sr.ht/~sircmpwn/aerc/lib"
|
|
"git.sr.ht/~sircmpwn/aerc/lib/ui"
|
|
"git.sr.ht/~sircmpwn/aerc/models"
|
|
)
|
|
|
|
type PartInfo struct {
|
|
Index []int
|
|
Msg *models.MessageInfo
|
|
Part *models.BodyStructure
|
|
}
|
|
|
|
type ProvidesMessage interface {
|
|
ui.Drawable
|
|
Store() *lib.MessageStore
|
|
SelectedAccount() *AccountView
|
|
SelectedMessage() (*models.MessageInfo, error)
|
|
SelectedMessagePart() *PartInfo
|
|
}
|
|
|
|
type ProvidesMessages interface {
|
|
ui.Drawable
|
|
Store() *lib.MessageStore
|
|
SelectedAccount() *AccountView
|
|
SelectedMessage() (*models.MessageInfo, error)
|
|
MarkedMessages() ([]uint32, error)
|
|
}
|