Skip to content

Commit

Permalink
widgets: thread: Include Subject in MessageSummary
Browse files Browse the repository at this point in the history
Replies to a parent message are not shown to avoid filling the buffer
with noisy repeating content.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
  • Loading branch information
kbingham committed Oct 20, 2021
1 parent 2494333 commit 99f1b2f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions alot/widgets/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,17 @@ def _render_wrap(size, focus=False):
def __str__(self):
author, address = self.message.get_author()
date = self.message.get_datestring()
subject = self.message.get_subject()
rep = author if author != '' else address
if date is not None:
rep += " (%s)" % date

# Hide Subjects which are replies to the parent message.
# This allows threads containing multiple messages with distinct
# subjects to be displayed without adding noise to the replies.
if not subject.startswith(('Re:')):
rep += " " + subject

return rep

def selectable(self):
Expand Down

0 comments on commit 99f1b2f

Please sign in to comment.