Skip to content

Commit

Permalink
fixing setIsDeleted method in Thread
Browse files Browse the repository at this point in the history
  • Loading branch information
jseverson committed Jul 27, 2011
1 parent 21a1609 commit c394af5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Document/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,8 @@ public function setIsDeletedByParticipant(ParticipantInterface $participant, $is
*/
public function setIsDeleted($isDeleted)
{
foreach($this->isDeletedByParticipant as $participantId => $isCurrentlyDeleted) {
$this->isDeletedByParticipant[$participantId] = (boolean) $isDeleted;
}
if($isDeleted) {
// also mark all thread messages as read
foreach ($this->getMessages() as $message) {
$message->setIsReadByParticipant($participant, true);
}
foreach($this->getParticipants() as $participant) {
$this->setIsDeletedByParticipant($participant, $isDeleted);
}
}

Expand Down

0 comments on commit c394af5

Please sign in to comment.