Skip to content

Commit

Permalink
Fix default display when preferred_languages unset
Browse files Browse the repository at this point in the history
- fixes neomutt#3174
  • Loading branch information
dcpurton authored and flatcap committed Dec 31, 2021
1 parent ebbdb90 commit 745e7c6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,16 @@ static int multilingual_handler(struct Body *a, struct State *s)
struct Body *zxx_part = NULL;
struct ListNode *np = NULL;

while (b)
{
if (mutt_can_decode(b))
{
first_part = b;
break;
}
b = b->next;
}

const struct Slist *c_preferred_languages =
cs_subset_slist(NeoMutt->sub, "preferred_languages");
if (c_preferred_languages)
Expand All @@ -1161,9 +1171,6 @@ static int multilingual_handler(struct Body *a, struct State *s)
{
if (mutt_can_decode(b))
{
if (!first_part)
first_part = b;

if (b->language && mutt_str_equal("zxx", b->language))
zxx_part = b;

Expand Down

0 comments on commit 745e7c6

Please sign in to comment.