summaryrefslogtreecommitdiff
path: root/alot/commands/thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r--alot/commands/thread.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 89b278ce..26045ca8 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -39,7 +39,6 @@ from ..settings.const import settings
from ..helper import parse_mailcap_nametemplate
from ..helper import split_commandstring
from ..utils import argparse as cargparse
-from ..widgets.globals import AttachmentWidget
MODE = 'thread'
@@ -834,7 +833,7 @@ class SaveAttachmentCommand(Command):
raise CommandCanceled()
else: # save focussed attachment
focus = ui.get_deep_focus()
- if isinstance(focus, AttachmentWidget):
+ if hasattr(focus, 'attachment'):
filename = focus.attachment.get_filename()
if not self.path:
msg = 'save attachment (%s) to ' % filename
@@ -973,7 +972,7 @@ class ThreadSelectCommand(Command):
- if it is an attachment line, open the attachment"""
async def apply(self, ui):
focus = ui.get_deep_focus()
- if isinstance(focus, AttachmentWidget):
+ if hasattr(focus, 'attachment'):
logging.info('open attachment')
await ui.apply_command(OpenAttachmentCommand(focus.attachment))
else: