summaryrefslogtreecommitdiff
path: root/alot/db/message.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/db/message.py')
-rw-r--r--alot/db/message.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/alot/db/message.py b/alot/db/message.py
index f9e8e37b..62b85788 100644
--- a/alot/db/message.py
+++ b/alot/db/message.py
@@ -35,24 +35,28 @@ class Message:
"""value of the Message-Id header (str)"""
id = None
+ """this message's depth in the thread tree"""
+ depth = None
+
"""A list of replies to this message"""
replies = None
- def __init__(self, dbman, msg, thread, replies):
+ def __init__(self, dbman, thread, msg, depth):
"""
:param dbman: db manager that is used for further lookups
:type dbman: alot.db.DBManager
- :param msg: the wrapped message
- :type msg: notmuch.database.Message
:param thread: this messages thread
:type thread: :class:`~alot.db.Thread`
- :param replies: a list of replies to this message
- :type replies alot.db.message.Message
+ :param msg: the wrapped message
+ :type msg: notmuch.database.Message
+ :param depth: depth of this message in the thread tree (0 for toplevel
+ messages, 1 for their replies etc.)
+ :type depth int
"""
self._dbman = dbman
self.id = msg.get_message_id()
self.thread = thread
- self.replies = replies
+ self.depth = depth
try:
self.date = datetime.fromtimestamp(msg.get_date())
except ValueError: