mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 09:36:17 +08:00
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();
|
||||
}
|
||||
|
||||
constructor(
|
||||
private readonly std: BlockStdScope,
|
||||
private readonly configs: Map<string, AttachmentEmbedConfig>
|
||||
) {
|
||||
get configs(): Map<string, AttachmentEmbedConfig> {
|
||||
return this.std.get(AttachmentEmbedConfigMapIdentifier);
|
||||
}
|
||||
|
||||
constructor(private readonly std: BlockStdScope) {
|
||||
super();
|
||||
}
|
||||
|
||||
@@ -82,10 +83,7 @@ export class AttachmentEmbedService extends Extension {
|
||||
di.addImpl(AttachmentEmbedConfigMapIdentifier, provider =>
|
||||
provider.getAll(AttachmentEmbedConfigIdentifier)
|
||||
);
|
||||
di.addImpl(AttachmentEmbedProvider, AttachmentEmbedService, [
|
||||
StdIdentifier,
|
||||
AttachmentEmbedConfigMapIdentifier,
|
||||
]);
|
||||
di.addImpl(AttachmentEmbedProvider, this, [StdIdentifier]);
|
||||
}
|
||||
|
||||
// Converts to embed view.
|
||||
|
||||
Reference in New Issue
Block a user