Explicitly track inline comment reply threading
Summary: Ref T1460. Track and store which comments are threaded replies to other comments, vs merely appearing on the same lines. This doesn't actually write `hasReplies` yet, since that needs to happen when we un-draft comments on submission. Test Plan: Made inline comments in Differential and Diffusion, including replies. Replies were marked as "Is Reply". Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1460 Differential Revision: https://secure.phabricator.com/D12017
This commit is contained in:
@@ -9,6 +9,7 @@ final class DifferentialInlineCommentQuery
|
||||
private $revisionIDs;
|
||||
private $notDraft;
|
||||
private $ids;
|
||||
private $phids;
|
||||
private $commentIDs;
|
||||
|
||||
private $viewerAndChangesetIDs;
|
||||
@@ -30,6 +31,11 @@ final class DifferentialInlineCommentQuery
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withPHIDs(array $phids) {
|
||||
$this->phids = $phids;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withViewerAndChangesetIDs($author_phid, array $ids) {
|
||||
$this->viewerAndChangesetIDs = array($author_phid, $ids);
|
||||
return $this;
|
||||
@@ -111,6 +117,13 @@ final class DifferentialInlineCommentQuery
|
||||
$this->ids);
|
||||
}
|
||||
|
||||
if ($this->phids !== null) {
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
'phid IN (%Ls)',
|
||||
$this->phids);
|
||||
}
|
||||
|
||||
if ($this->viewerAndChangesetIDs) {
|
||||
list($phid, $ids) = $this->viewerAndChangesetIDs;
|
||||
$where[] = qsprintf(
|
||||
|
||||
Reference in New Issue
Block a user