diff options
-rw-r--r-- | commands/msg/pipe.go | 3 | ||||
-rw-r--r-- | commands/msgview/open.go | 3 | ||||
-rw-r--r-- | commands/msgview/save.go | 3 | ||||
-rw-r--r-- | widgets/msgviewer.go | 1 | ||||
-rw-r--r-- | widgets/providesmessage.go | 1 |
5 files changed, 6 insertions, 5 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go index 001577c1..9491cf5d 100644 --- a/commands/msg/pipe.go +++ b/commands/msg/pipe.go @@ -126,7 +126,8 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { }) } else if pipePart { p := provider.SelectedMessagePart() - p.Store.FetchBodyPart(p.Msg.Uid, p.Msg.BodyStructure, p.Index, func(reader io.Reader) { + store := provider.Store() + store.FetchBodyPart(p.Msg.Uid, p.Msg.BodyStructure, p.Index, func(reader io.Reader) { if background { doExec(reader) } else { diff --git a/commands/msgview/open.go b/commands/msgview/open.go index b4675434..d4eacd4c 100644 --- a/commands/msgview/open.go +++ b/commands/msgview/open.go @@ -33,7 +33,8 @@ func (Open) Execute(aerc *widgets.Aerc, args []string) error { mv := aerc.SelectedTab().(*widgets.MessageViewer) p := mv.SelectedMessagePart() - p.Store.FetchBodyPart(p.Msg.Uid, p.Msg.BodyStructure, p.Index, func(reader io.Reader) { + store := mv.Store() + store.FetchBodyPart(p.Msg.Uid, p.Msg.BodyStructure, p.Index, func(reader io.Reader) { tmpFile, err := ioutil.TempFile(os.TempDir(), "aerc-") if err != nil { aerc.PushError(" " + err.Error()) diff --git a/commands/msgview/save.go b/commands/msgview/save.go index 7f236cb7..f3cbb70a 100644 --- a/commands/msgview/save.go +++ b/commands/msgview/save.go @@ -108,7 +108,8 @@ func (Save) Execute(aerc *widgets.Aerc, args []string) error { } ch := make(chan error, 1) - pi.Store.FetchBodyPart( + store := mv.Store() + store.FetchBodyPart( pi.Msg.Uid, pi.Msg.BodyStructure, pi.Index, func(reader io.Reader) { f, err := os.Create(path) if err != nil { diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index 36e7997d..9c759724 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -286,7 +286,6 @@ func (mv *MessageViewer) SelectedMessagePart() *PartInfo { Index: part.index, Msg: part.msg.MessageInfo(), Part: part.part, - Store: mv.Store(), } } diff --git a/widgets/providesmessage.go b/widgets/providesmessage.go index 06115d5f..b06825fa 100644 --- a/widgets/providesmessage.go +++ b/widgets/providesmessage.go @@ -10,7 +10,6 @@ type PartInfo struct { Index []int Msg *models.MessageInfo Part *models.BodyStructure - Store *lib.MessageStore } type ProvidesMessage interface { |