summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/msgviewer.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 5b97f6f..e210616 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -168,16 +168,16 @@ func createSwitcher(switcher *PartSwitcher, conf *config.AercConfig,
 			if switcher.selected == -1 && pv.part.MIMEType != "multipart" {
 				switcher.selected = i
 			}
-			if selectedPriority == -1 {
-				for idx, m := range conf.Viewer.Alternatives {
-					if m != pv.part.MIMEType+"/"+pv.part.MIMESubType {
-						continue
-					}
-					priority := len(conf.Viewer.Alternatives) - idx
-					if priority > selectedPriority {
-						selectedPriority = priority
-						switcher.selected = i
-					}
+			mime := strings.ToLower(pv.part.MIMEType) +
+				"/" + strings.ToLower(pv.part.MIMESubType)
+			for idx, m := range conf.Viewer.Alternatives {
+				if m != mime {
+					continue
+				}
+				priority := len(conf.Viewer.Alternatives) - idx
+				if priority > selectedPriority {
+					selectedPriority = priority
+					switcher.selected = i
 				}
 			}
 		}