Skip to content

Commit 99f1b2f

Browse files
committed
widgets: thread: Include Subject in MessageSummary
Replies to a parent message are not shown to avoid filling the buffer with noisy repeating content. Signed-off-by: Kieran Bingham <[email protected]>
1 parent 2494333 commit 99f1b2f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

alot/widgets/thread.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,17 @@ def _render_wrap(size, focus=False):
7878
def __str__(self):
7979
author, address = self.message.get_author()
8080
date = self.message.get_datestring()
81+
subject = self.message.get_subject()
8182
rep = author if author != '' else address
8283
if date is not None:
8384
rep += " (%s)" % date
85+
86+
# Hide Subjects which are replies to the parent message.
87+
# This allows threads containing multiple messages with distinct
88+
# subjects to be displayed without adding noise to the replies.
89+
if not subject.startswith(('Re:')):
90+
rep += " " + subject
91+
8492
return rep
8593

8694
def selectable(self):

0 commit comments

Comments
 (0)