X-Git-Url: https://git.madduck.net/etc/neomutt.git/blobdiff_plain/7767b3c3fd519d71c1f90e26c07084ba6b99702d..872d8e0875ecb2da4138e44568c8e715a0f21869:/.config/neomutt/buildmimetree.py diff --git a/.config/neomutt/buildmimetree.py b/.config/neomutt/buildmimetree.py index 2dac39c..57fc21a 100755 --- a/.config/neomutt/buildmimetree.py +++ b/.config/neomutt/buildmimetree.py @@ -370,8 +370,6 @@ def do_massage( # tree now: if item.cid: cmds.push(f"\\Ca\\Ck{item.cid}") - if item.desc: - cmds.push(f"\\Ca\\Ck{item.desc}") elif isinstance(item, Multipart): # This node has children, but we already visited them (see @@ -385,14 +383,14 @@ def do_massage( elif item.subtype == "multilingual": cmds.push("") - # Again, if there is a description, we might just as well: - if item.desc: - cmds.push(f"\\Ca\\Ck{item.desc}") - else: # We should never get here assert not "is valid part" + # If the item has a description, we might just as well add it + if item.desc: + cmds.push(f"\\Ca\\Ck{item.desc}") + # Finally, if we're at non-root level, tag the new container, # as it might itself be part of a container, to be processed # one level up: