From 4d143150ba1764ada71a07d1c97408caac1d24b7 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 13 May 2021 10:12:48 +0200 Subject: commands/thread:ReplyCommand: simplify list-reply logic --- alot/commands/thread.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 64b84bdb..06cc6666 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -167,15 +167,10 @@ class ReplyCommand(Command): def _list_reply(self, message): # Auto-detect ML - auto_replyto_mailinglist = settings.get('auto_replyto_mailinglist') if 'List-Id' in message.headers and self._force_list_reply is None: - # mail['List-Id'] is need to enable reply-to-list - return auto_replyto_mailinglist - elif 'List-Id' in message.headers and self._force_list_reply is True: - return True - elif self._force_list_reply is False: - # In this case we only need the sender - return False + return settings.get('auto_replyto_mailinglist') + + return bool(self._force_list_reply) async def apply(self, ui): message = ui.current_buffer.get_selected_message() -- cgit v1.2.3