mirror of
https://git.sr.ht/~sircmpwn/aerc
synced 2024-11-24 00:52:29 +01:00
cce7cb4808
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.
25 lines
459 B
Go
25 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
|
|
}
|