mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Don't consider empty inlines when considering whether a revision has draft comments or not
Summary: Ref T13513. When computing whether a revision has draft comments or not, ignore empty inlines. Test Plan: Added empty inlines to a revision, no longer saw a yellow "draft" bubble in the list UI. Maniphest Tasks: T13513 Differential Revision: https://secure.phabricator.com/D21215
This commit is contained in:
parent
9307f57747
commit
27b7ba814a
1 changed files with 10 additions and 1 deletions
|
@ -11,7 +11,7 @@ final class DifferentialTransactionQuery
|
|||
PhabricatorUser $viewer,
|
||||
DifferentialRevision $revision) {
|
||||
|
||||
return id(new DifferentialDiffInlineCommentQuery())
|
||||
$inlines = id(new DifferentialDiffInlineCommentQuery())
|
||||
->setViewer($viewer)
|
||||
->withRevisionPHIDs(array($revision->getPHID()))
|
||||
->withAuthorPHIDs(array($viewer->getPHID()))
|
||||
|
@ -19,6 +19,15 @@ final class DifferentialTransactionQuery
|
|||
->withIsDeleted(false)
|
||||
->needReplyToComments(true)
|
||||
->execute();
|
||||
|
||||
// Don't count empty inlines when considering draft state.
|
||||
foreach ($inlines as $key => $inline) {
|
||||
if ($inline->isEmptyInlineComment()) {
|
||||
unset($inlines[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
return $inlines;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue