From b22c890e4bcc119486adc8af55bc2a3c9af02b41 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 24 Jul 2015 12:11:41 +1000 Subject: [PATCH] FEATURE: correct :visited styling for logged on users --- app/assets/javascripts/discourse/helpers/topic-link.js.es6 | 4 +++- app/assets/stylesheets/common/base/_topic-list.scss | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/helpers/topic-link.js.es6 b/app/assets/javascripts/discourse/helpers/topic-link.js.es6 index 105ec123a..9c2a73870 100644 --- a/app/assets/javascripts/discourse/helpers/topic-link.js.es6 +++ b/app/assets/javascripts/discourse/helpers/topic-link.js.es6 @@ -3,5 +3,7 @@ import registerUnbound from 'discourse/helpers/register-unbound'; registerUnbound('topic-link', function(topic) { var title = topic.get('fancyTitle'); var url = topic.linked_post_number ? topic.urlForPostNumber(topic.linked_post_number) : topic.get('lastUnreadUrl'); - return new Handlebars.SafeString("" + title + ""); + + var extraClass = topic.get('last_read_post_number') === topic.get('highest_post_number') ? " visited" : ""; + return new Handlebars.SafeString("" + title + ""); }); diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scss index 609d0e157..057a8f099 100644 --- a/app/assets/stylesheets/common/base/_topic-list.scss +++ b/app/assets/stylesheets/common/base/_topic-list.scss @@ -17,6 +17,7 @@ } html.anon .topic-list a.title:visited:not(.badge-notification) {color: scale-color($primary, $lightness: 35%);} +.topic-list a.title.visited:not(.badge-notification) {color: scale-color($primary, $lightness: 35%);} .topic-list { width: 100%;