Fixed new PMs not highlighted

This commit is contained in:
Absurdon 2017-02-16 01:41:36 +01:00 committed by Ari Timonen
parent 472cad9155
commit e0710c9efc
2 changed files with 9 additions and 1 deletions

View file

@ -44,4 +44,8 @@
display: inline-block;
font-style: italic;
padding: 0 3px;
a {
color: white;
}
}

View file

@ -18,7 +18,11 @@
<div id="inbox" class="tab">
<% if cuser.received_messages.any? %>
<% cuser.received_messages.reverse_each do |message| %>
<div class="message <% 'highlight' if cuser.new_messages.include?(message) %>">
<% if cuser.new_messages.include?(message) %>
<div class="message highlight">
<% else %>
<div class="message">
<% end %>
<%= render partial: 'message', locals: { message: message } %>
</div>
<% end %>