mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 00:06:09 +08:00
fix(nbstore): reduce unnecessary sync (#10426)
This commit is contained in:
@@ -272,7 +272,7 @@ export class DocSyncPeer {
|
|||||||
jobs: (Job & { type: 'push' })[],
|
jobs: (Job & { type: 'push' })[],
|
||||||
signal?: AbortSignal
|
signal?: AbortSignal
|
||||||
) => {
|
) => {
|
||||||
if (this.status.connectedDocs.has(docId)) {
|
if (this.status.connectedDocs.has(docId) && !this.remote.isReadonly) {
|
||||||
const maxClock = jobs.reduce(
|
const maxClock = jobs.reduce(
|
||||||
(a, b) => (a.getTime() > b.clock.getTime() ? a : b.clock),
|
(a, b) => (a.getTime() > b.clock.getTime() ? a : b.clock),
|
||||||
new Date(0)
|
new Date(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user