Add gpodder min version
All checks were successful
repod / nextcloud (push) Successful in 44s
repod / nodejs (push) Successful in 1m23s

This commit is contained in:
Michel Roux 2023-08-30 09:33:15 +02:00
parent 7c875219f0
commit 98f6c7040f

View File

@ -17,6 +17,7 @@ class Application extends App implements IBootstrap
{
public const APP_ID = 'repod';
private const GPODDERSYNC_ID = 'gpoddersync';
private const GPODDERSYNC_MIN_VERSION = '3.8.1';
public function __construct()
{
@ -56,7 +57,8 @@ class Application extends App implements IBootstrap
/** @var array $appConfig */
$appConfig = json_decode((string) $settings['array']['oc_appconfig'], true);
$appConfig['repod'] = [
'gpodder' => $appManager->isEnabledForUser(self::GPODDERSYNC_ID),
'gpodder' => $appManager->isEnabledForUser(self::GPODDERSYNC_ID)
&& version_compare($appManager->getAppVersion(self::GPODDERSYNC_ID), self::GPODDERSYNC_MIN_VERSION) >= 0,
];
$settings['array']['oc_appconfig'] = json_encode($appConfig);
}