Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15283301
D17733.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D17733.id.diff
View Options
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());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 5, 6:42 AM (1 w, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7223789
Default Alt Text
D17733.id.diff (4 KB)
Attached To
Mode
D17733: Don't require a transaction to mark a participant up-to-date
Attached
Detach File
Event Timeline
Log In to Comment