diff --git a/src/applications/conpherence/controller/ConpherenceColumnViewController.php b/src/applications/conpherence/controller/ConpherenceColumnViewController.php --- a/src/applications/conpherence/controller/ConpherenceColumnViewController.php +++ b/src/applications/conpherence/controller/ConpherenceColumnViewController.php @@ -67,7 +67,7 @@ $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 --- a/src/applications/conpherence/controller/ConpherenceUpdateController.php +++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php @@ -531,7 +531,7 @@ $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 --- a/src/applications/conpherence/controller/ConpherenceViewController.php +++ b/src/applications/conpherence/controller/ConpherenceViewController.php @@ -55,15 +55,11 @@ } $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 @@ } } - 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 --- a/src/applications/conpherence/storage/ConpherenceParticipant.php +++ b/src/applications/conpherence/storage/ConpherenceParticipant.php @@ -31,9 +31,7 @@ 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());