Move full text search to proper events

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2021-04-01 11:43:35 +02:00
parent be5c4a1685
commit 322480a3b7
19 changed files with 540 additions and 725 deletions

View File

@@ -24,7 +24,6 @@
namespace OCA\Deck\Service;
use OC\EventDispatcher\SymfonyAdapter;
use OCA\Deck\Activity\ActivityManager;
use OCA\Deck\Activity\ChangeSet;
use OCA\Deck\BadRequestException;
@@ -37,7 +36,6 @@ use OCA\Deck\Db\LabelMapper;
use OCA\Deck\Db\Stack;
use OCA\Deck\Db\StackMapper;
use OCA\Deck\StatusException;
use Symfony\Component\EventDispatcher\GenericEvent;
class StackService {
private $stackMapper;
@@ -64,7 +62,6 @@ class StackService {
AssignmentMapper $assignedUsersMapper,
AttachmentService $attachmentService,
ActivityManager $activityManager,
SymfonyAdapter $eventDispatcher,
ChangeHelper $changeHelper
) {
$this->stackMapper = $stackMapper;
@@ -77,7 +74,6 @@ class StackService {
$this->assignedUsersMapper = $assignedUsersMapper;
$this->attachmentService = $attachmentService;
$this->activityManager = $activityManager;
$this->symfonyAdapter = $eventDispatcher;
$this->changeHelper = $changeHelper;
}
@@ -225,11 +221,6 @@ class StackService {
);
$this->changeHelper->boardChanged($boardId);
$this->symfonyAdapter->dispatch(
'\OCA\Deck\Stack::onCreate',
new GenericEvent(null, ['id' => $stack->getId(), 'stack' => $stack])
);
return $stack;
}
@@ -259,10 +250,6 @@ class StackService {
$this->changeHelper->boardChanged($stack->getBoardId());
$this->enrichStackWithCards($stack);
$this->symfonyAdapter->dispatch(
'\OCA\Deck\Stack::onDelete', new GenericEvent(null, ['id' => $id, 'stack' => $stack])
);
return $stack;
}
@@ -314,10 +301,6 @@ class StackService {
);
$this->changeHelper->boardChanged($stack->getBoardId());
$this->symfonyAdapter->dispatch(
'\OCA\Deck\Stack::onUpdate', new GenericEvent(null, ['id' => $id, 'stack' => $stack])
);
return $stack;
}