summaryrefslogtreecommitdiff
path: root/Project-Unite/Views/Forum/ViewTopic.cshtml
diff options
context:
space:
mode:
Diffstat (limited to 'Project-Unite/Views/Forum/ViewTopic.cshtml')
-rw-r--r--Project-Unite/Views/Forum/ViewTopic.cshtml8
1 files changed, 8 insertions, 0 deletions
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);
+ }
+ }
+
<div class="row panel panel-default">
<div class="panel-body">
<div class="col-xs-4"> <!--Mini profile data-->