Skip to content

Commit

Permalink
fixup! Move over comments to the new event
Browse files Browse the repository at this point in the history
  • Loading branch information
rullzer committed Sep 9, 2019
1 parent d314963 commit 051ae3e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/comments/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ public function __construct (array $urlParams = array()) {
public function register() {
$server = $this->getContainer()->getServer();

$dispatcher = $server->getEventDispatcher();
/** @var IEventDispatcher $newDispatcher */
$newDispatcher = $server->query(IEventDispatcher::class);
$this->registerSidebarScripts($newDispatcher);
$dispatcher = $server->query(IEventDispatcher::class);
$this->registerSidebarScripts($dispatcher);
$this->registerDavEntity($dispatcher);
$this->registerNotifier();
$this->registerCommentsEventHandler();
Expand All @@ -66,7 +65,7 @@ protected function registerSidebarScripts(IEventDispatcher $dispatcher) {
$dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadAdditionalScripts::class);
}

protected function registerDavEntity(EventDispatcherInterface $dispatcher) {
protected function registerDavEntity(IEventDispatcher $dispatcher) {
$dispatcher->addListener(CommentsEntityEvent::EVENT_ENTITY, function(CommentsEntityEvent $event) {
$event->addEntityCollection('files', function($name) {
$nodes = \OC::$server->getUserFolder()->getById((int)$name);
Expand Down

0 comments on commit 051ae3e

Please sign in to comment.