From 92d829584aaccd3a01a900952078c17f2c6db0af Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Fri, 1 Apr 2022 10:50:00 -0100 Subject: [PATCH] update population Signed-off-by: Maxence Lange --- lib/Command/CirclesList.php | 6 +++--- lib/FederatedItems/CircleCreate.php | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Command/CirclesList.php b/lib/Command/CirclesList.php index 967cc1a27..1915b8350 100644 --- a/lib/Command/CirclesList.php +++ b/lib/Command/CirclesList.php @@ -257,9 +257,9 @@ private function displayCircles(array $circles): void { Circle::$DEF_SOURCE[$circle->getSource()], $this->cut($displayName ? $owner->getDisplayName() : $owner->getUserId(), 40), $this->configService->displayInstance($owner->getInstance()), - $circle->getPopulation() . '/' . $this->getInt( - 'members_limit', $circle->getSettings(), -1 - ) + $circle->getPopulation() . '/' + . $this->getInt('members_limit', $circle->getSettings(), -1) + . ' (' . $circle->getPopulationInherited() . ')' ] ); } diff --git a/lib/FederatedItems/CircleCreate.php b/lib/FederatedItems/CircleCreate.php index 5f2803016..38f725f14 100644 --- a/lib/FederatedItems/CircleCreate.php +++ b/lib/FederatedItems/CircleCreate.php @@ -142,7 +142,9 @@ public function manage(FederatedEvent $event): void { $this->circleRequest->save($circle); $this->memberRequest->save($owner); + $this->membershipService->onUpdate($owner->getSingleId()); + $this->membershipService->updatePopulation($circle); $this->eventService->circleCreating($event); }