refactor(editor): should not rely on doc collection type (#9501)

This commit is contained in:
Saul-Mirone
2025-01-03 06:30:27 +00:00
parent cb5d7eaabc
commit 897c7d4284
55 changed files with 200 additions and 158 deletions
@@ -1,11 +1,11 @@
import type { Collection } from '@affine/env/filter';
import type { DocCollection } from '@blocksuite/affine/store';
import type { Workspace } from '@blocksuite/affine/store';
import { nanoid } from 'nanoid';
import type { Map as YMap } from 'yjs';
import { Doc as YDoc } from 'yjs';
export class UserSetting {
constructor(
private readonly docCollection: DocCollection,
private readonly docCollection: Workspace,
private readonly userId: string
) {}
@@ -38,9 +38,6 @@ export class UserSetting {
}
}
export const getUserSetting = (
docCollection: DocCollection,
userId: string
) => {
export const getUserSetting = (docCollection: Workspace, userId: string) => {
return new UserSetting(docCollection, userId);
};