aerc/widgets/providesmessage.go
Ben Burwell cce7cb4808 Factor UI models out of the worker message package
Before, the information needed to display different parts of the UI was
tightly coupled to the specific messages being sent back and forth to
the backend worker. Separating out a models package allows us to be more
specific about exactly what a backend is able to and required to
provide for the UI.
2019-07-08 16:06:23 -04:00

24 lines
459 B
Go

package widgets
import (
"github.com/emersion/go-imap"
"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 *types.MessageInfo
Part *imap.BodyStructure
Store *lib.MessageStore
}
type ProvidesMessage interface {
ui.Drawable
Store() *lib.MessageStore
SelectedAccount() *AccountView
SelectedMessage() *models.MessageInfo
SelectedMessagePart() *PartInfo
}