Adjust preview event name to BeforePreviewFetchedEvent

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2022-10-27 16:05:40 +02:00
Родитель 0d5cdf3b80
Коммит f0d88ba9be
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4C614C6ED2CDE6DF
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -53,7 +53,7 @@ use OCP\Files\Template\TemplateFileCreator;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IPreview;
use OCP\Preview\BeforeFetchPreviewEvent;
use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\Security\CSP\AddContentSecurityPolicyEvent;
class Application extends App implements IBootstrap {
@ -72,7 +72,7 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(AddContentSecurityPolicyEvent::class, CSPListener::class);
$context->registerEventListener(LoadViewer::class, LoadViewerListener::class);
$context->registerEventListener(ShareLinkAccessedEvent::class, ShareLinkListener::class);
$context->registerEventListener(BeforeFetchPreviewEvent::class, BeforeFetchPreviewListener::class);
$context->registerEventListener(BeforePreviewFetchedEvent::class, BeforeFetchPreviewListener::class);
}
public function boot(IBootContext $context): void {

Просмотреть файл

@ -33,7 +33,7 @@ use OCP\EventDispatcher\IEventListener;
use OCP\Files\NotFoundException;
use OCP\IRequest;
use OCP\IUserSession;
use OCP\Preview\BeforeFetchPreviewEvent;
use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OCP\Share\IShare;
@ -52,7 +52,7 @@ class BeforeFetchPreviewListener implements IEventListener {
}
public function handle(Event $event): void {
if (!$event instanceof BeforeFetchPreviewEvent) {
if (!$event instanceof BeforePreviewFetchedEvent) {
return;
}
$shareToken = $this->request->getParam('token');

Просмотреть файл

@ -23,7 +23,7 @@
<code>Pdf</code>
</MissingDependency>
<UndefinedClass occurrences="1">
<code>BeforeFetchPreviewEvent</code>
<code>BeforePreviewFetchedEvent</code>
</UndefinedClass>
</file>
<file src="lib/Command/ActivateConfig.php">
@ -154,7 +154,7 @@
</file>
<file src="lib/Listener/BeforeFetchPreviewListener.php">
<UndefinedClass occurrences="1">
<code>BeforeFetchPreviewEvent</code>
<code>BeforePreviewFetchedEvent</code>
</UndefinedClass>
</file>
<file src="lib/PermissionManager.php">