summaryrefslogtreecommitdiff
path: root/alot/commands/thread.py
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-04-25 16:55:11 +0200
committerAnton Khirnov <anton@khirnov.net>2020-04-25 16:56:16 +0200
commit6c212ffd4a2ccc8612d1197dd0c0c63e247f738a (patch)
tree8caa04ca2467671c7304d7a6a432dab6efa9e00a /alot/commands/thread.py
parent81dfe5b12bb8fce168c097ef2e1eeef295a884f2 (diff)
commands/thread: stop using message widgets without reason
This code only wants the messages themselves, not the widgets.
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r--alot/commands/thread.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 344cf35e..af5576cb 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -1058,16 +1058,14 @@ class TagCommand(Command):
Command.__init__(self, **kwargs)
async def apply(self, ui):
- tbuffer = ui.current_buffer
if self.all:
- msg_wgts = list(tbuffer.message_widgets())
+ messages = ui.current_buffer.thread.messages.values()
else:
- msg_wgts = [tbuffer.get_selected_message_widget()]
+ messages = [ui.current_buffer.get_selected_message()]
tags = [t for t in self.tagsstring.split(',') if t]
try:
- for mt in msg_wgts:
- m = mt.get_message()
+ for m in messages:
if self.action == 'add':
m.add_tags(tags)
if self.action == 'set':