mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 08:36:22 +08:00
chore: bump blocksuite (#7075)
## Features - toeverything/blocksuite#6937 @Flrande ## Bugfix - toeverything/blocksuite#7137 @fundon - toeverything/blocksuite#7126 @golok727 - toeverything/blocksuite#7128 @CatsJuice - toeverything/blocksuite#7130 @fundon ## Refactor ## Misc - toeverything/blocksuite#7131 @fundon ## Additional changes Adjust the awareness provider so that it only obtains awareness instances when connect, and fixes the dependencies between workspace components.
This commit is contained in:
@@ -108,11 +108,9 @@ const getOrCreateShellWorkspace = (workspaceId: string) => {
|
||||
const blobStorage = new CloudBlobStorage(workspaceId);
|
||||
docCollection = new DocCollection({
|
||||
id: workspaceId,
|
||||
blobStorages: [
|
||||
() => ({
|
||||
crud: blobStorage,
|
||||
}),
|
||||
],
|
||||
blobSources: {
|
||||
main: blobStorage,
|
||||
},
|
||||
schema: globalBlockSuiteSchema,
|
||||
});
|
||||
docCollectionMap.set(workspaceId, docCollection);
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ export const ProfilePanel = () => {
|
||||
}
|
||||
try {
|
||||
const reducedFile = await validateAndReduceImage(file);
|
||||
const blobs = workspace.docCollection.blob;
|
||||
const blobs = workspace.docCollection.blobSync;
|
||||
const blobId = await blobs.set(reducedFile);
|
||||
workspace.docCollection.meta.setAvatar(blobId);
|
||||
} catch (error) {
|
||||
|
||||
@@ -190,7 +190,7 @@ const ImagePreviewModalImpl = (
|
||||
if (typeof blockId === 'string') {
|
||||
const block = page.getBlockById(blockId) as ImageBlockModel;
|
||||
assertExists(block);
|
||||
const store = block.page.blob;
|
||||
const store = block.page.blobSync;
|
||||
const url = store?.get(block.sourceId as string);
|
||||
const img = await url;
|
||||
if (!img) {
|
||||
@@ -260,7 +260,7 @@ const ImagePreviewModalImpl = (
|
||||
assertExists(page);
|
||||
const block = page.getBlockById(blockId) as ImageBlockModel;
|
||||
assertExists(block);
|
||||
return props.docCollection.blob.get(block?.sourceId as string);
|
||||
return props.docCollection.blobSync.get(block?.sourceId as string);
|
||||
},
|
||||
suspense: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user