aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/msgviewer.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-06-19 17:58:08 +0200
committerReto Brunner <reto@labrat.space>2020-07-27 09:19:27 +0200
commitc574a838fa89bf46bf7188442f400b206b04df95 (patch)
tree89c40ba4a7f5f5a2e67ca8fb225f7d5d3eb319ad /widgets/msgviewer.go
parent494bd674a98bc9f2889acad0fda3ff4c77c641b5 (diff)
downloadaerc-c574a838fa89bf46bf7188442f400b206b04df95.tar.gz
Remove hard coded bodystruct path everywhere
Aerc usually used the path []int{1} if it didn't know what the proper path is. However this only works for multipart messages and breaks if it isn't one. This patch removes all the hard coding and extracts the necessary helpers to lib.
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r--widgets/msgviewer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index f06b787f..a7b9fd61 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -180,7 +180,7 @@ func createSwitcher(acct *AccountView, switcher *PartSwitcher,
if len(msg.BodyStructure().Parts) == 0 {
switcher.selected = 0
- pv, err := NewPartViewer(acct, conf, msg, msg.BodyStructure(), []int{1})
+ pv, err := NewPartViewer(acct, conf, msg, msg.BodyStructure(), nil)
if err != nil {
return err
}