From a06b892704982f3bc65ee7d6176efa22c24a4fb4 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 13 Apr 2020 16:38:06 +0200 Subject: widgets/search: remove support for the 'content' field It is not useful and too complex/fragile to maintain. --- alot/widgets/search.py | 9 --------- 1 file changed, 9 deletions(-) (limited to 'alot/widgets') diff --git a/alot/widgets/search.py b/alot/widgets/search.py index 4e612e8c..4036d187 100644 --- a/alot/widgets/search.py +++ b/alot/widgets/search.py @@ -181,14 +181,6 @@ def prepare_subject_string(thread): return thread.subject or ' ' -def prepare_content_string(thread): - msgs = sorted(thread.messages.values(), - key=lambda msg: msg.date, reverse=True) - lastcontent = ' '.join(m.get_body_text() for m in msgs) - lastcontent = lastcontent.replace('^>.*$', '') - return lastcontent - - def prepare_string(partname, thread, maxw): """ extract a content string for part 'partname' from 'thread' of maximal @@ -200,7 +192,6 @@ def prepare_string(partname, thread, maxw): 'date': (prepare_date_string, None), 'authors': (prepare_authors_string, shorten_author_string), 'subject': (prepare_subject_string, None), - 'content': (prepare_content_string, None), } s = ' ' # fallback value -- cgit v1.2.3