diff --git a/brutaldon/threadtree.py b/brutaldon/threadtree.py index f4da6db..fe49144 100644 --- a/brutaldon/threadtree.py +++ b/brutaldon/threadtree.py @@ -51,14 +51,14 @@ def maketree(mastodon, descendants): IN = 0 OUT = 1 -class POST: - post = None - def __init__(self, post): - self.post = post +class TOOT: + toot = None + def __init__(self, toot): + self.toot = toot def unmaketree(tree): - for post, children in tree: - yield POST(post) + for toot, children in tree: + yield TOOT(toot) if children: yield IN yield from unmaketree(children) @@ -71,6 +71,6 @@ def build(mastodon, descendants): yield OUT yield IN leftover = tuple(leftover()) - for post in leftover: - yield POST(post) + for toot in leftover: + yield TOOT(toot) yield OUT diff --git a/brutaldon/views.py b/brutaldon/views.py index 758ffdd..c25b7e2 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -692,7 +692,7 @@ def thread(request, id): # descendants = [ # x for x in context.descendants if not toot_matches_filters(x, filters) # ] - posts = tuple(threadtree.build(mastodon, context.descendants)) + toots = tuple(threadtree.build(mastodon, context.descendants)) return render( request, "main/thread.html", @@ -700,7 +700,7 @@ def thread(request, id): "context": context, "toot": toot, "root": root, - "posts": posts, + "toots": toots, "own_acct": request.session["active_user"], "notifications": notifications, "preferences": account.preferences,