diff --git a/src/applications/conpherence/controller/ConpherenceColumnViewController.php b/src/applications/conpherence/controller/ConpherenceColumnViewController.php index aa4f94edfc..3bd0c6b111 100644 --- a/src/applications/conpherence/controller/ConpherenceColumnViewController.php +++ b/src/applications/conpherence/controller/ConpherenceColumnViewController.php @@ -67,7 +67,7 @@ final class ConpherenceColumnViewController extends $transactions = $conpherence->getTransactions(); $latest_transaction = head($transactions); $write_guard = AphrontWriteGuard::beginScopedUnguardedWrites(); - $participant->markUpToDate($conpherence, $latest_transaction); + $participant->markUpToDate($conpherence); unset($write_guard); $draft = PhabricatorDraft::newFromUserAndKey( diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php index 7b41d5bb2d..d95696b68f 100644 --- a/src/applications/conpherence/controller/ConpherenceUpdateController.php +++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php @@ -531,7 +531,7 @@ final class ConpherenceUpdateController $key = PhabricatorConpherenceColumnMinimizeSetting::SETTINGKEY; $minimized = $user->getUserSetting($key); if (!$minimized) { - $participant->markUpToDate($conpherence, $data['latest_transaction']); + $participant->markUpToDate($conpherence); } } else if ($need_transactions) { $non_update = true; diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php index e097aa376e..68d2d3d145 100644 --- a/src/applications/conpherence/controller/ConpherenceViewController.php +++ b/src/applications/conpherence/controller/ConpherenceViewController.php @@ -55,15 +55,11 @@ final class ConpherenceViewController extends } $this->setConpherence($conpherence); - $transactions = $this->getNeededTransactions( - $conpherence, - $old_message_id); - $latest_transaction = head($transactions); $participant = $conpherence->getParticipantIfExists($user->getPHID()); if ($participant) { if (!$participant->isUpToDate($conpherence)) { $write_guard = AphrontWriteGuard::beginScopedUnguardedWrites(); - $participant->markUpToDate($conpherence, $latest_transaction); + $participant->markUpToDate($conpherence); $user->clearCacheData(PhabricatorUserMessageCountCacheType::KEY_COUNT); unset($write_guard); } @@ -199,33 +195,6 @@ final class ConpherenceViewController extends } } - private function getNeededTransactions( - ConpherenceThread $conpherence, - $message_id) { - - if ($message_id) { - $newer_transactions = $conpherence->getTransactions(); - $query = id(new ConpherenceTransactionQuery()) - ->setViewer($this->getRequest()->getUser()) - ->withObjectPHIDs(array($conpherence->getPHID())) - ->setAfterID($message_id) - ->needHandles(true) - ->setLimit(self::OLDER_FETCH_LIMIT); - $older_transactions = $query->execute(); - $handles = array(); - foreach ($older_transactions as $transaction) { - $handles += $transaction->getHandles(); - } - $conpherence->attachHandles($conpherence->getHandles() + $handles); - $transactions = array_merge($newer_transactions, $older_transactions); - $conpherence->attachTransactions($transactions); - } else { - $transactions = $conpherence->getTransactions(); - } - - return $transactions; - } - private function getMainQueryLimit() { $request = $this->getRequest(); $base_limit = ConpherenceThreadQuery::TRANSACTION_LIMIT; diff --git a/src/applications/conpherence/storage/ConpherenceParticipant.php b/src/applications/conpherence/storage/ConpherenceParticipant.php index 1c4178c2dc..1edf7940e9 100644 --- a/src/applications/conpherence/storage/ConpherenceParticipant.php +++ b/src/applications/conpherence/storage/ConpherenceParticipant.php @@ -31,9 +31,7 @@ final class ConpherenceParticipant extends ConpherenceDAO { return nonempty($this->settings, array()); } - public function markUpToDate( - ConpherenceThread $conpherence, - ConpherenceTransaction $xaction) { + public function markUpToDate(ConpherenceThread $conpherence) { if (!$this->isUpToDate($conpherence)) { $this->setSeenMessageCount($conpherence->getMessageCount());