Commit 58beb551 authored by Skia's avatar Skia 🤘
Browse files

Fix unread messages in topic


Signed-off-by: Skia's avatarSkia <skia@libskia.so>
parent ca047d96
Pipeline #1051 passed with stage
in 4 minutes and 35 seconds
...@@ -584,7 +584,7 @@ textarea { ...@@ -584,7 +584,7 @@ textarea {
font-size: 100%; font-size: 100%;
} }
&.unread { &.unread {
background: #d8e7f3; background: $secondary-neutral-light-color;
} }
} }
......
...@@ -182,7 +182,7 @@ class ForumTopicDetailView(CanViewMixin, DetailView): ...@@ -182,7 +182,7 @@ class ForumTopicDetailView(CanViewMixin, DetailView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
kwargs = super(ForumTopicDetailView, self).get_context_data(**kwargs) kwargs = super(ForumTopicDetailView, self).get_context_data(**kwargs)
try: try:
msg = self.object.get_first_unread_message(user) msg = self.object.get_first_unread_message(self.request.user)
kwargs['first_unread_message_id'] = msg.id kwargs['first_unread_message_id'] = msg.id
except: except:
kwargs['first_unread_message_id'] = float("inf") kwargs['first_unread_message_id'] = float("inf")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment