diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-10-03 20:51:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 20:51:34 +0300 |
commit | 1f191c47c9e4f2d92e7c8b493dfa36f62046dadc (patch) | |
tree | 1b2d2059c03ca03d1fea905a49fc273a8475b646 /lib | |
parent | 95dc91b10fa43d3012d5b39e8a6b4b5231253733 (diff) | |
parent | 23672d4d9d7872757da509baacc74ebd6b2dcc76 (diff) |
Merge pull request #8085 from nextcloud/bugfix/7362/update-projects-integration-events
Move to new event syntax
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AppInfo/Application.php | 3 | ||||
-rw-r--r-- | lib/Controller/PageController.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index d50322263..cf9803e6f 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -26,6 +26,7 @@ namespace OCA\Talk\AppInfo; use OCA\Talk\Collaboration\Reference\ReferenceInvalidationListener; use OCA\Talk\Collaboration\Reference\TalkReferenceProvider; +use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent; use OCP\Util; use OCA\Circles\Events\AddingCircleMemberEvent; use OCA\Circles\Events\CircleDestroyedEvent; @@ -197,7 +198,7 @@ class Application extends App implements IBootstrap { /** @var IProviderManager $resourceManager */ $resourceManager = $server->get(IProviderManager::class); $resourceManager->registerResourceProvider(ConversationProvider::class); - $server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () { + $server->getEventDispatcher()->addListener(LoadAdditionalScriptsEvent::class, function () { Util::addScript(self::APP_ID, 'talk-collections'); }); } diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index dbf2bb366..4814952e4 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -46,7 +46,7 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Template\PublicTemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\Collaboration\Reference\RenderReferenceEvent; -use OCP\EventDispatcher\GenericEvent; +use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\IRootFolder; use OCP\HintException; @@ -268,7 +268,7 @@ class PageController extends Controller { $this->eventDispatcher->dispatchTyped(new LoadViewer()); } - $this->eventDispatcher->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts', new GenericEvent()); + $this->eventDispatcher->dispatchTyped(new LoadAdditionalScriptsEvent()); $this->eventDispatcher->dispatchTyped(new RenderReferenceEvent()); $response = new TemplateResponse($this->appName, 'index', [ |