From 6361ffedaae332cd238f34fc1934993f3b48240d Mon Sep 17 00:00:00 2001 From: vrana Date: Mon, 6 Aug 2012 20:42:43 -0700 Subject: [PATCH] Load changesets with inline comments drafts in large diff Test Plan: Displayed a large diff with inline comment draft. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3175 --- .../controller/DifferentialRevisionViewController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 5b5c824969..28db134b48 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -200,8 +200,15 @@ final class DifferentialRevisionViewController extends DifferentialController { ""); $warning = $warning->render(); + $my_inlines = id(new DifferentialInlineComment())->loadAllWhere( + 'revisionID = %d AND commentID IS NULL AND authorPHID = %s AND '. + 'changesetID IN (%Ld)', + $this->revisionID, + $user->getPHID(), + mpull($changesets, 'getID')); + $visible_changesets = array(); - foreach ($inlines as $inline) { + foreach ($inlines + $my_inlines as $inline) { $changeset_id = $inline->getChangesetID(); if (isset($changesets[$changeset_id])) { $visible_changesets[$changeset_id] = $changesets[$changeset_id];