Skip to content

Commit

Permalink
fix: min 27 max 30
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <[email protected]>
  • Loading branch information
skjnldsv committed Jul 31, 2024
1 parent a5f5f7a commit b0a5f43
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<screenshot>https://raw.githubusercontent.com/nextcloud/files_downloadactivity/master/docs/screenshot.png</screenshot>

<dependencies>
<nextcloud min-version="26" max-version="28" />
<nextcloud min-version="27" max-version="30" />
</dependencies>

<activity>
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"config": {
"classmap-authoritative": true,
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "7.4"
},
"sort-packages": true
"php": "8.1"
}
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
Expand Down
12 changes: 6 additions & 6 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\File;
use OCP\Util;
use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Util;

class Application extends App implements IBootstrap {
public const APP_ID = 'files_downloadactivity';
Expand All @@ -46,9 +46,9 @@ public function register(IRegistrationContext $context): void {
public function boot(IBootContext $context): void {
Util::connectHook('OC_Filesystem', 'read', $this, 'listenReadFile');

$eventDispatcher = $this->getContainer()->query(IEventDispatcher::class);
$eventDispatcher = $this->getContainer()->get(IEventDispatcher::class);
$eventDispatcher->addListener(
BeforePreviewFetchedEvent::class,
BeforePreviewFetchedEvent::class,
function (BeforePreviewFetchedEvent $event) {
$this->listenPreviewFile($event);
}
Expand All @@ -60,7 +60,7 @@ function (BeforePreviewFetchedEvent $event) {
*/
public function listenReadFile(array $params): void {
/** @var Listener $hooks */
$hooks = $this->getContainer()->query(Listener::class);
$hooks = $this->getContainer()->get(Listener::class);
$hooks->readFile($params['path']);
}

Expand Down Expand Up @@ -88,7 +88,7 @@ public function listenPreviewFile(BeforePreviewFetchedEvent $event): void {
}

/** @var Listener $hooks */
$hooks = $this->getContainer()->query(Listener::class);
$hooks = $this->getContainer()->get(Listener::class);
$hooks->readFile($path);
}
}

0 comments on commit b0a5f43

Please sign in to comment.