diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-10-20 16:19:45 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-10-20 16:19:45 +0200 |
commit | aab91ae9f730a2d385ee6277fc5ebffa38f39ff4 (patch) | |
tree | a49ce9842958998d5e125f8826abd42ff09e2281 /alot/widgets | |
parent | c12540d435aca5ba3139a9aeb02207699b85eb53 (diff) |
widgets/thread: simplify code
Diffstat (limited to 'alot/widgets')
-rw-r--r-- | alot/widgets/thread.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index 2af22b07..35024d34 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -562,11 +562,8 @@ class ThreadNode(urwid.WidgetWrap): _have_next_sibling = None def __init__(self, msg, thread, pos, indent): - if pos & 1: - attr = settings.get_theming_attribute('thread', 'summary', 'odd') - else: - attr = settings.get_theming_attribute('thread', 'summary', 'even') - + parity = 'odd' if pos & 1 else 'even' + attr = settings.get_theming_attribute('thread', 'summary', parity) attr_focus = settings.get_theming_attribute('thread', 'summary', 'focus') msg_summary = MessageSummaryWidget(msg, attr, attr_focus) |