Conpherence - fix unread counts

Summary: we weren't updating the "latest seen transaction PHID" properly. do that and ONLY do it from the view handler so we know the user got a real good chance of actually seeing the message. also we weren't searching through the transactions correctly; fix that.

Test Plan: sent a test user some messages. noted the proper count of unread messages.

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D4677
This commit is contained in:
Bob Trahan
2013-01-26 18:53:30 -08:00
parent 9437bc019d
commit 22ce74c5a8
4 changed files with 12 additions and 10 deletions

View File

@@ -41,11 +41,7 @@ final class ConpherenceListController extends
}
$this->setSelectedConpherencePHID($conpherence->getPHID());
$read_status = ConpherenceParticipationStatus::UP_TO_DATE;
$participant = $conpherence->getParticipant($user->getPHID());
$write_guard = AphrontWriteGuard::beginScopedUnguardedWrites();
$participant->markUpToDate();
unset($write_guard);
$current_selection_epoch = $participant->getDateTouched();
}