From 0d6d08667184ec8bafb352d822b75462efb162bf Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 18 Mar 2021 17:03:16 +0100 Subject: widgets/thread: disregard whitespace-only alternatives --- alot/widgets/thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- cgit v1.2.3