From c65ef0401e20502eae73b2dbcd1b6c3a5bbc3a21 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 22 Apr 2017 09:21:40 -0700 Subject: [PATCH] (stable) Fix Conpherence theme variables for both logged-out and logged-in users Summary: Ref T12622. Test Plan: As a logged-out and logged-in user, loaded Conpherence threads. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12622 Differential Revision: https://secure.phabricator.com/D17768 --- src/applications/conpherence/storage/ConpherenceThread.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/applications/conpherence/storage/ConpherenceThread.php b/src/applications/conpherence/storage/ConpherenceThread.php index 0c70ef2cb5..bb355154a4 100644 --- a/src/applications/conpherence/storage/ConpherenceThread.php +++ b/src/applications/conpherence/storage/ConpherenceThread.php @@ -204,17 +204,18 @@ final class ConpherenceThread extends ConpherenceDAO } $user_participation = $this->getParticipantIfExists($viewer->getPHID()); - $theme_class = ConpherenceRoomSettings::COLOR_LIGHT; + $theme = ConpherenceRoomSettings::COLOR_LIGHT; if ($user_participation) { $user_seen_count = $user_participation->getSeenMessageCount(); $participant = $this->getParticipant($viewer->getPHID()); $settings = $participant->getSettings(); $theme = idx($settings, 'theme', $theme); - $theme_class = ConpherenceRoomSettings::getThemeClass($theme); } else { $user_seen_count = 0; } + $unread_count = $this->getMessageCount() - $user_seen_count; + $theme_class = ConpherenceRoomSettings::getThemeClass($theme); $title = $this->getTitle(); $topic = $this->getTopic();