Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Services\IInitialState;
use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IDBConnection;
Expand Down Expand Up @@ -447,6 +448,30 @@ public function boot(IBootContext $context): void
{
// Background jobs are registered declaratively in appinfo/info.xml.
// Initialization is handled by the Repair step (InitializeSettings).
// No per-request work needed here.
// Provision IAppConfig keys referenced as `@resolve:<key>` sentinels in
// src/manifest.json so @conduction/nextcloud-vue's resolver chain can
// pick them up synchronously via @nextcloud/initial-state (Step 1)
// without falling through to the deferred backend fetch (Step 2).
// See node_modules/@conduction/nextcloud-vue/src/utils/resolveManifestSentinels.js
// — readInitialState() calls loadState(appId, key, undefined).
$container = $this->getContainer();
$initialState = $container->get(IInitialState::class);
$appConfig = $container->get(IAppConfig::class);

// Keys must match every distinct `@resolve:<key>` sentinel in
// src/manifest.json. Discover with:
// grep -oE '@resolve:[a-z_]+' src/manifest.json | sort -u.
$resolveKeys = [
'voorzieningen_register',
];
foreach ($resolveKeys as $key) {
$value = $appConfig->getValueString(self::APP_ID, $key, '');
$provisioned = null;
if ($value !== '') {
$provisioned = $value;
}

$initialState->provideInitialState($key, $provisioned);
}
}//end boot()
}//end class
Loading