chore(editor): no need to cache attachment embed config map (#10197)
### What's Changed! * no need to cache attachment embed config map
This commit is contained in:
@@ -71,10 +71,11 @@ export class AttachmentEmbedService extends Extension {
|
|||||||
return this.configs.values();
|
return this.configs.values();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
get configs(): Map<string, AttachmentEmbedConfig> {
|
||||||
private readonly std: BlockStdScope,
|
return this.std.get(AttachmentEmbedConfigMapIdentifier);
|
||||||
private readonly configs: Map<string, AttachmentEmbedConfig>
|
}
|
||||||
) {
|
|
||||||
|
constructor(private readonly std: BlockStdScope) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,10 +83,7 @@ export class AttachmentEmbedService extends Extension {
|
|||||||
di.addImpl(AttachmentEmbedConfigMapIdentifier, provider =>
|
di.addImpl(AttachmentEmbedConfigMapIdentifier, provider =>
|
||||||
provider.getAll(AttachmentEmbedConfigIdentifier)
|
provider.getAll(AttachmentEmbedConfigIdentifier)
|
||||||
);
|
);
|
||||||
di.addImpl(AttachmentEmbedProvider, AttachmentEmbedService, [
|
di.addImpl(AttachmentEmbedProvider, this, [StdIdentifier]);
|
||||||
StdIdentifier,
|
|
||||||
AttachmentEmbedConfigMapIdentifier,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Converts to embed view.
|
// Converts to embed view.
|
||||||
|
|||||||
Reference in New Issue
Block a user