From 13a6a3fa7109ce6dcff79ea9ed2a012226386fad Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sun, 17 May 2020 11:44:38 +0200 Subject: FetchBodyPart doesn't need the parent body structure --- lib/messageview.go | 8 +++----- lib/msgstore.go | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/messageview.go b/lib/messageview.go index 39708045..59a1af6b 100644 --- a/lib/messageview.go +++ b/lib/messageview.go @@ -28,8 +28,7 @@ type MessageView interface { Store() *MessageStore // Fetches a specific body part for this message - FetchBodyPart(parent *models.BodyStructure, - part []int, cb func(io.Reader)) + FetchBodyPart(part []int, cb func(io.Reader)) PGPDetails() *openpgp.MessageDetails } @@ -110,11 +109,10 @@ func (msv *MessageStoreView) PGPDetails() *openpgp.MessageDetails { return msv.details } -func (msv *MessageStoreView) FetchBodyPart(parent *models.BodyStructure, - part []int, cb func(io.Reader)) { +func (msv *MessageStoreView) FetchBodyPart(part []int, cb func(io.Reader)) { if msv.message == nil { - msv.messageStore.FetchBodyPart(msv.messageInfo.Uid, parent, part, cb) + msv.messageStore.FetchBodyPart(msv.messageInfo.Uid, part, cb) return } diff --git a/lib/msgstore.go b/lib/msgstore.go index 3fe26cbd..7dc26898 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -136,8 +136,7 @@ func (store *MessageStore) FetchFull(uids []uint32, cb func(*types.FullMessage)) } } -func (store *MessageStore) FetchBodyPart( - uid uint32, parent *models.BodyStructure, part []int, cb func(io.Reader)) { +func (store *MessageStore) FetchBodyPart(uid uint32, part []int, cb func(io.Reader)) { store.worker.PostAction(&types.FetchMessageBodyPart{ Uid: uid, -- cgit