diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-10-25 12:53:10 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-10-27 14:31:33 +0200 |
commit | 07e94eca6f9fc8ea0bc814d90f6b1403bb9f707a (patch) | |
tree | f37c009a79e42642ed00e53eec83a4f490b1b600 /lib/private/PreviewManager.php | |
parent | 8ee76c0d89c02dd359640deea53bb789bb982aca (diff) | |
download | nextcloud-server-07e94eca6f9fc8ea0bc814d90f6b1403bb9f707a.tar.gz nextcloud-server-07e94eca6f9fc8ea0bc814d90f6b1403bb9f707a.zip |
Emit typed event when preview is requested
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/PreviewManager.php')
-rw-r--r-- | lib/private/PreviewManager.php | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php index a2d34892c68..0d08ef3eba5 100644 --- a/lib/private/PreviewManager.php +++ b/lib/private/PreviewManager.php @@ -34,6 +34,7 @@ use OC\AppFramework\Bootstrap\Coordinator; use OC\Preview\Generator; use OC\Preview\GeneratorHelper; use OCP\AppFramework\QueryException; +use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\File; use OCP\Files\IAppData; use OCP\Files\IRootFolder; @@ -51,7 +52,8 @@ class PreviewManager implements IPreview { protected IConfig $config; protected IRootFolder $rootFolder; protected IAppData $appData; - protected EventDispatcherInterface $eventDispatcher; + protected IEventDispatcher $eventDispatcher; + protected EventDispatcherInterface $legacyEventDispatcher; private ?Generator $generator = null; private GeneratorHelper $helper; protected bool $providerListDirty = false; @@ -73,20 +75,22 @@ class PreviewManager implements IPreview { private IBinaryFinder $binaryFinder; public function __construct( - IConfig $config, - IRootFolder $rootFolder, - IAppData $appData, - EventDispatcherInterface $eventDispatcher, - GeneratorHelper $helper, - ?string $userId, - Coordinator $bootstrapCoordinator, - IServerContainer $container, - IBinaryFinder $binaryFinder + IConfig $config, + IRootFolder $rootFolder, + IAppData $appData, + IEventDispatcher $eventDispatcher, + EventDispatcherInterface $legacyEventDispatcher, + GeneratorHelper $helper, + ?string $userId, + Coordinator $bootstrapCoordinator, + IServerContainer $container, + IBinaryFinder $binaryFinder ) { $this->config = $config; $this->rootFolder = $rootFolder; $this->appData = $appData; $this->eventDispatcher = $eventDispatcher; + $this->legacyEventDispatcher = $legacyEventDispatcher; $this->helper = $helper; $this->userId = $userId; $this->bootstrapCoordinator = $bootstrapCoordinator; @@ -153,6 +157,7 @@ class PreviewManager implements IPreview { $this->rootFolder, $this->config ), + $this->legacyEventDispatcher, $this->eventDispatcher ); } |