mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +01:00
Cleaning up day view clusters for events shorter than about 30 minutes
Summary: Cleaning up day view clusters for events shorter than about 30 minutes Test Plan: Create two event within 30 minutes, 1 minute long, each. Day view should properly cluster the events. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12799
This commit is contained in:
parent
8056719eee
commit
b53ecd0d42
1 changed files with 4 additions and 3 deletions
|
@ -84,7 +84,7 @@ final class PHUICalendarDayView extends AphrontView {
|
|||
}
|
||||
foreach ($current_hour_events as $event) {
|
||||
$event_start = $event->getEpochStart();
|
||||
$event_end = $event->getEpochEnd();
|
||||
$event_end = min($event->getEpochEnd(), $day_end);
|
||||
|
||||
$top = (($event_start - $hour_start) / ($hour_end - $hour_start))
|
||||
* 100;
|
||||
|
@ -233,6 +233,7 @@ final class PHUICalendarDayView extends AphrontView {
|
|||
$this->rangeStart->getEpoch() > $day_end)) {
|
||||
$errors[] = pht('Day is out of query range');
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
|
||||
private function renderSidebar() {
|
||||
|
@ -503,8 +504,8 @@ final class PHUICalendarDayView extends AphrontView {
|
|||
|
||||
foreach ($events as $event) {
|
||||
$destination_cluster_key = null;
|
||||
$event_start = $event->getEpochStart();
|
||||
$event_end = $event->getEpochEnd();
|
||||
$event_start = $event->getEpochStart() - (30 * 60);
|
||||
$event_end = $event->getEpochEnd() + (30 * 60);
|
||||
|
||||
foreach ($clusters as $key => $cluster) {
|
||||
foreach ($cluster as $clustered_event) {
|
||||
|
|
Loading…
Reference in a new issue