summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-08-18 19:09:24 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-08-18 19:09:24 +0100
commit57a13b909c1bc8b2595d30e8bc5ce58004f9651d (patch)
treefd1e63fbea773f4e73932c1ff0873d1eaa4745c8 /alot
parent89ef835605f5e4bb9980fc487bacd63db6c407f3 (diff)
parent0c248e207a07838bbe20f4034ca0e04ec344ad89 (diff)
Merge branch 'hotfix-maildirflags' into develop
Diffstat (limited to 'alot')
-rw-r--r--alot/buffer.py2
-rw-r--r--alot/db.py7
-rw-r--r--alot/message.py1
3 files changed, 8 insertions, 2 deletions
diff --git a/alot/buffer.py b/alot/buffer.py
index 4d6eca6d..553648b4 100644
--- a/alot/buffer.py
+++ b/alot/buffer.py
@@ -251,10 +251,10 @@ class ThreadBuffer(Buffer):
for mw in self.get_message_widgets():
msg = mw.get_message()
if msg.matches(querystring):
+ mw.fold(visible=True)
if 'unread' in msg.get_tags():
msg.remove_tags(['unread'])
self.ui.apply_command(command.FlushCommand())
- mw.fold(visible=True)
def get_message_widgets(self):
return self.body.body.contents
diff --git a/alot/db.py b/alot/db.py
index 94338982..5dca9b88 100644
--- a/alot/db.py
+++ b/alot/db.py
@@ -149,6 +149,13 @@ class DBManager:
except:
return None
+ def get_message(self, mid):
+ """returns the message with given id as alot.message.Message object"""
+ mode = Database.MODE.READ_ONLY
+ db = Database(path=self.path, mode=mode)
+ msg = db.find_message(mid)
+ return Message(self, msg)
+
def get_all_tags(self):
"""returns all tags as list of strings"""
db = Database(path=self.path)
diff --git a/alot/message.py b/alot/message.py
index 29f8896f..ed020af9 100644
--- a/alot/message.py
+++ b/alot/message.py
@@ -45,7 +45,6 @@ class Message:
self._thread = thread
self._datetime = datetime.fromtimestamp(msg.get_date())
self._filename = msg.get_filename()
- # TODO: change api to return unicode
self._from = msg.get_header('From')
self._email = None # will be read upon first use
self._attachments = None # will be read upon first use