Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(nbstore): reduce unnecessary sync (#10426)

EYHNcafff4e0eb3f
diff --git a/packages/common/nbstore/src/sync/doc/peer.ts b/packages/common/nbstore/src/sync/doc/peer.ts
index fcf02f4244..13dce7a687 100644
--- a/packages/common/nbstore/src/sync/doc/peer.ts
+++ b/packages/common/nbstore/src/sync/doc/peer.ts
@@ -272,7 +272,7 @@ export class DocSyncPeer {
jobs: (Job & { type: 'push' })[],
signal?: AbortSignal
) => {
- if (this.status.connectedDocs.has(docId)) {
+ if (this.status.connectedDocs.has(docId) && !this.remote.isReadonly) {
const maxClock = jobs.reduce(
(a, b) => (a.getTime() > b.clock.getTime() ? a : b.clock),
new Date(0)