From 32e2eecdd4904383df6c377cb3ea64f8f0a8f1e4 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 27 Mar 2017 16:11:39 -0400 Subject: Finish unread posts --- Project-Unite/Views/Forum/ViewTopic.cshtml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Project-Unite/Views/Forum/ViewTopic.cshtml') diff --git a/Project-Unite/Views/Forum/ViewTopic.cshtml b/Project-Unite/Views/Forum/ViewTopic.cshtml index 4348518..ceeaa97 100644 --- a/Project-Unite/Views/Forum/ViewTopic.cshtml +++ b/Project-Unite/Views/Forum/ViewTopic.cshtml @@ -32,6 +32,14 @@ @foreach (var post in Model.Posts.OrderBy(x => x.PostedAt)) { + if (Request.IsAuthenticated) + { + if (ACL.IsUnread(User.Identity.GetUserId(), post.Id)) + { + ACL.MarkRead(User.Identity.GetUserId(), post.Id); + } + } +
-- cgit v1.2.3