diff options
Diffstat (limited to 'alot/db/thread.py')
-rw-r--r-- | alot/db/thread.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/alot/db/thread.py b/alot/db/thread.py index a76997f8..3dc90325 100644 --- a/alot/db/thread.py +++ b/alot/db/thread.py @@ -107,22 +107,23 @@ class Thread: msg_tree = [] msg_list = [] - def thread_tree_walk(nm_msg, depth): + def thread_tree_walk(nm_msg, depth, parent): msg = Message(self._dbman, self, nm_msg, depth) msg_list.append(msg) replies = [] for m in nm_msg.get_replies(): - replies.append(thread_tree_walk(m, depth + 1)) + replies.append(thread_tree_walk(m, depth + 1, msg)) msg.replies = replies + msg.parent = parent msgs[msg.id] = msg return msg for m in nm_thread.get_toplevel_messages(): - msg_tree.append(thread_tree_walk(m, 0)) + msg_tree.append(thread_tree_walk(m, 0, None)) return msgs, msg_tree, msg_list |