Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-10-03 11:17:41 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-10-03 20:52:03 +0300
commit2dbdb2a26835bf5d7463fc42bb6635c8963a92ac (patch)
tree43689ef119a7d8f902b55bfa3d8e4748dbb54b7b /lib
parent142aba3d2526a2373df9df65813f0956f66c8008 (diff)
Move to new event syntaxbackport/8085/stable25
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/AppInfo/Application.php3
-rw-r--r--lib/Controller/PageController.php4
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', [