prevent always selecting html part in multipart/alternative
authorPaul <paul@claws-mail.org>
Sat, 20 Feb 2016 10:10:21 +0000 (10:10 +0000)
committerPaul <paul@claws-mail.org>
Sat, 20 Feb 2016 10:10:21 +0000 (10:10 +0000)
this bug was introduced in 4745b80528426498b9e4f61d0f1a812e94ce1a6e

src/messageview.c

index e191a533cf752f667d649207823f632f251c0c6e..e25edc0ef6a8a1cd580af2a73da042c39720d9cd 100644 (file)
@@ -1526,7 +1526,10 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
                                }
                        }
                        messageview_find_part_depth_first(&context, MIMETYPE_TEXT, "html");
                                }
                        }
                        messageview_find_part_depth_first(&context, MIMETYPE_TEXT, "html");
-                       if (context.found) { /* html found */
+                       if (context.found &&
+                           (msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_ALWAYS ||
+                            (msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_DEFAULT &&
+                             prefs_common.promote_html_part))) { /* html found */
                                mimeinfo = context.found;
                                if (messageview_try_select_mimeinfo(messageview, msginfo, mimeinfo))
                                        goto done;
                                mimeinfo = context.found;
                                if (messageview_try_select_mimeinfo(messageview, msginfo, mimeinfo))
                                        goto done;