Moved card-asset load to be last on activate

- I think this is the least important process, so it can go last
This commit is contained in:
Hannah Wolfe 2021-11-23 17:00:59 +00:00
parent 4c7330125f
commit b98fd62a3d
No known key found for this signature in database
GPG Key ID: AB586C3B5AE5C037

View File

@ -66,15 +66,14 @@ class Bridge {
themeEngine.setActive(settings, loadedTheme, checkedTheme);
const currentGhostAPI = this.getActiveTheme().engine('ghost-api');
const cardAssetConfig = this.getCardAssetConfig();
debug('reload card assets config', cardAssetConfig);
cardAssetService.load(cardAssetConfig);
if (previousGhostAPI !== undefined && (previousGhostAPI !== currentGhostAPI)) {
events.emit('services.themes.api.changed');
this.reloadFrontend();
}
const cardAssetConfig = this.getCardAssetConfig();
debug('reload card assets config', cardAssetConfig);
cardAssetService.load(cardAssetConfig);
} catch (err) {
logging.error(new errors.InternalServerError({
message: tpl(messages.activateFailed, {theme: loadedTheme.name}),