1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

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
This commit is contained in:
epriestley 2016-11-18 11:50:05 -08:00
parent 132b0803cb
commit 39509648f2

View file

@ -370,11 +370,13 @@ final class PhabricatorCalendarEventSearchEngine
$month_view->setUser($viewer); $month_view->setUser($viewer);
$viewer_phid = $viewer->getPHID();
foreach ($events as $event) { foreach ($events as $event) {
$epoch_min = $event->getStartDateTimeEpoch(); $epoch_min = $event->getStartDateTimeEpoch();
$epoch_max = $event->getEndDateTimeEpoch(); $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()) $event_view = id(new AphrontCalendarEventView())
->setHostPHID($event->getHostPHID()) ->setHostPHID($event->getHostPHID())
@ -384,7 +386,7 @@ final class PhabricatorCalendarEventSearchEngine
->setURI($event->getURI()) ->setURI($event->getURI())
->setIsAllDay($event->getIsAllDay()) ->setIsAllDay($event->getIsAllDay())
->setIcon($event->getDisplayIcon($viewer)) ->setIcon($event->getDisplayIcon($viewer))
->setViewerIsInvited($is_invited) ->setViewerIsInvited($is_invited || $is_attending)
->setDatetimeSummary($event->renderEventDate($viewer, true)) ->setDatetimeSummary($event->renderEventDate($viewer, true))
->setIconColor($event->getDisplayIconColor($viewer)); ->setIconColor($event->getDisplayIconColor($viewer));