From e26c47bb60e146f4bf05c982831980ac2cc0774d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 20 Jan 2021 13:49:07 +0100 Subject: commands/search: remove unused code --- alot/commands/search.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/alot/commands/search.py b/alot/commands/search.py index d4c1a258..a189ddc4 100644 --- a/alot/commands/search.py +++ b/alot/commands/search.py @@ -22,22 +22,14 @@ MODE = 'search' class OpenThreadCommand(Command): """open thread in a new buffer""" - def __init__(self, thread=None, **kwargs): - """ - :param thread: thread to open (Uses focussed thread if unset) - :type thread: :class:`~alot.db.Thread` - """ - self.thread = thread - Command.__init__(self, **kwargs) def apply(self, ui): - if not self.thread: - self.thread = ui.current_buffer.get_selected_thread() - if self.thread: + thread = ui.current_buffer.get_selected_thread() + if thread: query = ui.current_buffer.querystring - logging.info('open thread view for %s', self.thread) + logging.info('open thread view for %s', thread) - tb = buffers.ThreadBuffer(ui, self.thread) + tb = buffers.ThreadBuffer(ui, thread) ui.buffer_open(tb) tb.focus_next_matching(query) -- cgit v1.2.3