Remove rename listener
parent
08dbabb3f2
commit
9b93a508ce
|
@ -34,7 +34,6 @@ use OCP\AppFramework\Bootstrap\IBootstrap;
|
||||||
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
||||||
use OCP\Files\Events\Node\NodeWrittenEvent;
|
use OCP\Files\Events\Node\NodeWrittenEvent;
|
||||||
use OCP\Files\Events\Node\NodeDeletedEvent;
|
use OCP\Files\Events\Node\NodeDeletedEvent;
|
||||||
use OCP\Files\Events\Node\NodeRenamedEvent;
|
|
||||||
use OCP\Files\Events\Node\NodeTouchedEvent;
|
use OCP\Files\Events\Node\NodeTouchedEvent;
|
||||||
|
|
||||||
class Application extends App implements IBootstrap {
|
class Application extends App implements IBootstrap {
|
||||||
|
@ -68,7 +67,6 @@ class Application extends App implements IBootstrap {
|
||||||
|
|
||||||
public function register(IRegistrationContext $context): void {
|
public function register(IRegistrationContext $context): void {
|
||||||
$context->registerEventListener(NodeWrittenEvent::class, PostWriteListener::class);
|
$context->registerEventListener(NodeWrittenEvent::class, PostWriteListener::class);
|
||||||
$context->registerEventListener(NodeRenamedEvent::class, PostWriteListener::class);
|
|
||||||
$context->registerEventListener(NodeTouchedEvent::class, PostWriteListener::class);
|
$context->registerEventListener(NodeTouchedEvent::class, PostWriteListener::class);
|
||||||
$context->registerEventListener(NodeDeletedEvent::class, PostDeleteListener::class);
|
$context->registerEventListener(NodeDeletedEvent::class, PostDeleteListener::class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ use \OCA\Memories\Db\TimelineWrite;
|
||||||
|
|
||||||
use OCP\EventDispatcher\Event;
|
use OCP\EventDispatcher\Event;
|
||||||
use OCP\EventDispatcher\IEventListener;
|
use OCP\EventDispatcher\IEventListener;
|
||||||
use OCP\Files\Events\Node\NodeRenamedEvent;
|
|
||||||
use OCP\Files\Events\Node\NodeTouchedEvent;
|
use OCP\Files\Events\Node\NodeTouchedEvent;
|
||||||
use OCP\Files\Events\Node\NodeWrittenEvent;
|
use OCP\Files\Events\Node\NodeWrittenEvent;
|
||||||
use OCP\Files\Folder;
|
use OCP\Files\Folder;
|
||||||
|
@ -45,8 +44,7 @@ class PostWriteListener implements IEventListener {
|
||||||
|
|
||||||
public function handle(Event $event): void {
|
public function handle(Event $event): void {
|
||||||
if (!($event instanceof NodeWrittenEvent) &&
|
if (!($event instanceof NodeWrittenEvent) &&
|
||||||
!($event instanceof NodeTouchedEvent) &&
|
!($event instanceof NodeTouchedEvent)) {
|
||||||
!($event instanceof NodeRenamedEvent)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue