summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-03-18 17:03:16 +0100
committerAnton Khirnov <anton@khirnov.net>2021-03-18 17:03:16 +0100
commit0d6d08667184ec8bafb352d822b75462efb162bf (patch)
treed8ccab23774c9ec457ec08f47f7929bd65e6fcd3
parentc913c6b179973a310cb6c4fbbfc4adefad50f6e0 (diff)
widgets/thread: disregard whitespace-only alternatives
-rw-r--r--alot/widgets/thread.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py
index 90eeabdf..111c8569 100644
--- a/alot/widgets/thread.py
+++ b/alot/widgets/thread.py
@@ -525,7 +525,7 @@ def _render_mime_tree(mime_tree, alternative_pref, force_inline_types):
# try rendering the message
text = mime_tree.render_str()
if text is not None:
- return _TextPart(text, mime_tree) if len(text) else _EmptyPartWidget()
+ return _TextPart(text, mime_tree) if len(text.strip()) else _EmptyPartWidget()
body_wgt = urwid.Text('Undisplayable "%s" MIME part.' % mime_tree.content_type,
align = 'center')