From 975c205d1d8152f68745597487862ead00c6dac9 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 22 Nov 2022 19:58:42 -0700 Subject: Show boosts and likes on other post list pages --- activities/views/timelines.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'activities/views') diff --git a/activities/views/timelines.py b/activities/views/timelines.py index 837e5df..0c5de0e 100644 --- a/activities/views/timelines.py +++ b/activities/views/timelines.py @@ -77,6 +77,13 @@ class Local(ListView): .order_by("-created")[:50] ) + def get_context_data(self): + context = super().get_context_data() + context["interactions"] = PostInteraction.get_post_interactions( + context["page_obj"], self.request.identity + ) + return context + @method_decorator(identity_required, name="dispatch") class Federated(ListView): @@ -96,6 +103,13 @@ class Federated(ListView): .order_by("-created")[:50] ) + def get_context_data(self): + context = super().get_context_data() + context["interactions"] = PostInteraction.get_post_interactions( + context["page_obj"], self.request.identity + ) + return context + @method_decorator(identity_required, name="dispatch") class Notifications(ListView): -- cgit v1.2.3