Pholio inline comments appear after comment
Summary: Pholio inline comments now appear after comments. Adding inline comment shows up properly on comments.
Test Plan: {F33723}
Reviewers: epriestley, johann.fridriksson
Reviewed By: johann.fridriksson
CC: aran, Korvin
Maniphest Tasks: T2446
Differential Revision: https://secure.phabricator.com/D5103
This commit is contained in:
committed by
epriestley
parent
04aa59abc6
commit
1f00f2728b
@@ -140,4 +140,22 @@ final class PholioMockEditor extends PhabricatorApplicationTransactionEditor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function sortTransactions(array $xactions) {
|
||||||
|
$head = array();
|
||||||
|
$tail = array();
|
||||||
|
|
||||||
|
// Move inline comments to the end, so the comments preceed them.
|
||||||
|
foreach ($xactions as $xaction) {
|
||||||
|
$type = $xaction->getTransactionType();
|
||||||
|
if ($type == PholioTransactionType::TYPE_INLINE) {
|
||||||
|
$tail[] = $xaction;
|
||||||
|
} else {
|
||||||
|
$head[] = $xaction;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_values(array_merge($head, $tail));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ final class PholioTransaction extends PhabricatorApplicationTransaction {
|
|||||||
'The old description was: %s',
|
'The old description was: %s',
|
||||||
$this->renderHandleLink($author_phid),
|
$this->renderHandleLink($author_phid),
|
||||||
$old);
|
$old);
|
||||||
|
break;
|
||||||
|
case PholioTransactionType::TYPE_INLINE:
|
||||||
|
return pht(
|
||||||
|
'%s added an inline comment.',
|
||||||
|
$this->renderHandleLink($author_phid));
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::getTitle();
|
return parent::getTitle();
|
||||||
|
|||||||
Reference in New Issue
Block a user