diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-01-20 13:49:07 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-01-20 13:49:07 +0100 |
commit | e26c47bb60e146f4bf05c982831980ac2cc0774d (patch) | |
tree | fe1533130f3f50fe040e553e1440e8e949f1c60b | |
parent | 7426569514ff43d0ee32b136fa72c3bb4a0b650a (diff) |
commands/search: remove unused code
-rw-r--r-- | alot/commands/search.py | 16 |
1 files 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) |