diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 250e741a55..f403a4ed7e 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -316,6 +316,7 @@ phutil_register_library_map(array( 'ConpherenceTestCase' => 'applications/conpherence/__tests__/ConpherenceTestCase.php', 'ConpherenceThread' => 'applications/conpherence/storage/ConpherenceThread.php', 'ConpherenceThreadDatasource' => 'applications/conpherence/typeahead/ConpherenceThreadDatasource.php', + 'ConpherenceThreadDateMarkerTransaction' => 'applications/conpherence/xaction/ConpherenceThreadDateMarkerTransaction.php', 'ConpherenceThreadIndexEngineExtension' => 'applications/conpherence/engineextension/ConpherenceThreadIndexEngineExtension.php', 'ConpherenceThreadListView' => 'applications/conpherence/view/ConpherenceThreadListView.php', 'ConpherenceThreadMailReceiver' => 'applications/conpherence/mail/ConpherenceThreadMailReceiver.php', @@ -5107,6 +5108,7 @@ phutil_register_library_map(array( 'PhabricatorNgramsInterface', ), 'ConpherenceThreadDatasource' => 'PhabricatorTypeaheadDatasource', + 'ConpherenceThreadDateMarkerTransaction' => 'ConpherenceThreadTransactionType', 'ConpherenceThreadIndexEngineExtension' => 'PhabricatorIndexEngineExtension', 'ConpherenceThreadListView' => 'AphrontView', 'ConpherenceThreadMailReceiver' => 'PhabricatorObjectMailReceiver', diff --git a/src/applications/conpherence/ConpherenceTransactionRenderer.php b/src/applications/conpherence/ConpherenceTransactionRenderer.php index 187247e063..5a6eaffaf2 100644 --- a/src/applications/conpherence/ConpherenceTransactionRenderer.php +++ b/src/applications/conpherence/ConpherenceTransactionRenderer.php @@ -60,7 +60,8 @@ final class ConpherenceTransactionRenderer extends Phobject { // between days. some setup required! $previous_transaction = null; $date_marker_transaction = id(new ConpherenceTransaction()) - ->setTransactionType(ConpherenceTransaction::TYPE_DATE_MARKER) + ->setTransactionType( + ConpherenceThreadDateMarkerTransaction::TRANSACTIONTYPE) ->makeEphemeral(); $date_marker_transaction_view = id(new ConpherenceTransactionView()) ->setUser($user) diff --git a/src/applications/conpherence/storage/ConpherenceTransaction.php b/src/applications/conpherence/storage/ConpherenceTransaction.php index c692dffb98..2fb3fca380 100644 --- a/src/applications/conpherence/storage/ConpherenceTransaction.php +++ b/src/applications/conpherence/storage/ConpherenceTransaction.php @@ -4,7 +4,6 @@ final class ConpherenceTransaction extends PhabricatorModularTransaction { const TYPE_PARTICIPANTS = 'participants'; - const TYPE_DATE_MARKER = 'date-marker'; public function getApplicationName() { return 'conpherence'; @@ -39,8 +38,6 @@ final class ConpherenceTransaction switch ($this->getTransactionType()) { case self::TYPE_PARTICIPANTS: return ($old === null); - case self::TYPE_DATE_MARKER: - return false; } return parent::shouldHide(); @@ -93,8 +90,6 @@ final class ConpherenceTransaction $phids[] = $this->getAuthorPHID(); switch ($this->getTransactionType()) { - case self::TYPE_DATE_MARKER: - break; case self::TYPE_PARTICIPANTS: $phids = array_merge($phids, $this->getOldValue()); $phids = array_merge($phids, $this->getNewValue()); diff --git a/src/applications/conpherence/view/ConpherenceTransactionView.php b/src/applications/conpherence/view/ConpherenceTransactionView.php index 28dcf5c361..d976fb604f 100644 --- a/src/applications/conpherence/view/ConpherenceTransactionView.php +++ b/src/applications/conpherence/view/ConpherenceTransactionView.php @@ -67,7 +67,7 @@ final class ConpherenceTransactionView extends AphrontView { $transaction = $this->getConpherenceTransaction(); switch ($transaction->getTransactionType()) { - case ConpherenceTransaction::TYPE_DATE_MARKER: + case ConpherenceThreadDateMarkerTransaction::TRANSACTIONTYPE: return javelin_tag( 'div', array( diff --git a/src/applications/conpherence/xaction/ConpherenceThreadDateMarkerTransaction.php b/src/applications/conpherence/xaction/ConpherenceThreadDateMarkerTransaction.php new file mode 100644 index 0000000000..3a7819ba4e --- /dev/null +++ b/src/applications/conpherence/xaction/ConpherenceThreadDateMarkerTransaction.php @@ -0,0 +1,8 @@ +