1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

remove full subscription to set

This commit is contained in:
Andrew Simachev 2025-06-07 01:48:08 +02:00
parent 1c02229135
commit 6e68ea5890
No known key found for this signature in database
GPG key ID: 1DFE44B21443F0EF
2 changed files with 9 additions and 2 deletions

View file

@ -373,7 +373,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
this.viewId = viewId;
const { rootId, block } = this.props;
const { rootId, block, isInline } = this.props;
const subId = this.getSubId();
const keys = this.getKeys(viewId);
const sources = this.getSources();
@ -407,6 +407,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
};
Dataview.getData({
isInline,
rootId,
subId,
blockId: block.id,

View file

@ -143,12 +143,13 @@ class Dataview {
limit: 0,
sources: [],
clear: false,
isInline: false,
collectionId: '',
filters: [],
sorts: [],
}, param);
const { rootId, blockId, newViewId, keys, offset, limit, collectionId } = param;
const { rootId, blockId, newViewId, keys, offset, limit, collectionId, clear, isInline } = param;
const block = S.Block.getLeaf(rootId, blockId);
const view = S.Record.getView(rootId, blockId, newViewId);
@ -169,6 +170,11 @@ class Dataview {
meta.viewId = newViewId;
};
if (!isInline && (viewChange || clear)) {
S.Record.recordsSet(subId, '', []);
};
S.Record.metaSet(subId, '', meta);
if (block) {