summaryrefslogtreecommitdiff
path: root/alot/commands.py
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-07-19 11:47:20 +0100
committerpazz <patricktotzke@gmail.com>2011-07-19 11:47:20 +0100
commit9d4302a05d8abd1e7228d735725d4189f752b4bc (patch)
tree0effaaa3443e194e324bcc5a9fc7c07ab2714020 /alot/commands.py
parente56c7e8995d48a12644ca2e06824982d56d0df4b (diff)
remove unread flag when opening a thread
Diffstat (limited to 'alot/commands.py')
-rw-r--r--alot/commands.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/alot/commands.py b/alot/commands.py
index 4820e9f3..1fe2d8a1 100644
--- a/alot/commands.py
+++ b/alot/commands.py
@@ -70,6 +70,12 @@ class OpenThreadCommand(Command):
sb = buffer.SingleThreadBuffer(ui, self.thread)
ui.buffer_open(sb)
+ # in case the thread is yet unread, remove this tag
+ if 'unread' in self.thread.get_tags():
+ self.thread.remove_tags(['unread'])
+ ui.apply_command(FlushCommand())
+
+
class SearchCommand(Command):
"""open a new search buffer"""