From 39509648f2ba6f1a8969b840bc378f0a4d6f6fd8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 18 Nov 2016 11:50:05 -0800 Subject: [PATCH] In Calendar mobile month view, color circles green for attending events too Summary: Ref T11816. We currently color circles green if you're invited, but should color them green if you're attending, too. Test Plan: Viewed calendar mobile month view, saw attending events in green. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11816 Differential Revision: https://secure.phabricator.com/D16899 --- .../calendar/query/PhabricatorCalendarEventSearchEngine.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index 05d4eadb16..79d4321545 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -370,11 +370,13 @@ final class PhabricatorCalendarEventSearchEngine $month_view->setUser($viewer); + $viewer_phid = $viewer->getPHID(); foreach ($events as $event) { $epoch_min = $event->getStartDateTimeEpoch(); $epoch_max = $event->getEndDateTimeEpoch(); - $is_invited = $event->isRSVPInvited($viewer->getPHID()); + $is_invited = $event->isRSVPInvited($viewer_phid); + $is_attending = $event->getIsUserAttending($viewer_phid); $event_view = id(new AphrontCalendarEventView()) ->setHostPHID($event->getHostPHID()) @@ -384,7 +386,7 @@ final class PhabricatorCalendarEventSearchEngine ->setURI($event->getURI()) ->setIsAllDay($event->getIsAllDay()) ->setIcon($event->getDisplayIcon($viewer)) - ->setViewerIsInvited($is_invited) + ->setViewerIsInvited($is_invited || $is_attending) ->setDatetimeSummary($event->renderEventDate($viewer, true)) ->setIconColor($event->getDisplayIconColor($viewer));