mirror of
https://git.sr.ht/~sircmpwn/aerc
synced 2024-11-23 16:42:07 +01:00
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.
30 lines
607 B
Go
30 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)
|
|
}
|