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:
		| @@ -49,8 +49,10 @@ final class ConpherenceViewController extends | ||||
|     $this->setConpherence($conpherence); | ||||
|  | ||||
|     $participant = $conpherence->getParticipant($user->getPHID()); | ||||
|     $transactions = $conpherence->getTransactions(); | ||||
|     $latest_transaction = end($transactions); | ||||
|     $write_guard = AphrontWriteGuard::beginScopedUnguardedWrites(); | ||||
|     $participant->markUpToDate(); | ||||
|     $participant->markUpToDate($latest_transaction); | ||||
|     unset($write_guard); | ||||
|  | ||||
|     $header = $this->renderHeaderPaneContent(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Bob Trahan
					Bob Trahan