Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(sync): rename _receiveSteps to receiveSteps
It has always been publicly called from the PollingBackend.

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud authored and mejo- committed Nov 27, 2024
commit 0b83dbbbe3db8512081e6d86d95696d7cfcfe81e
2 changes: 1 addition & 1 deletion src/services/PollingBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class PollingBackend {
this.#fetchRetryCounter = 0

this.#syncService.emit('change', { document, sessions })
this.#syncService._receiveSteps(data)
this.#syncService.receiveSteps(data)

if (data.steps.length === 0) {
if (!this.#initialLoadingFinished) {
Expand Down
4 changes: 2 additions & 2 deletions src/services/SyncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class SyncService {
this.pushError = 0
this.sending = false
if (steps?.length > 0) {
this._receiveSteps({ steps })
this.receiveSteps({ steps })
}
}).catch(err => {
const { response, code } = err
Expand Down Expand Up @@ -227,7 +227,7 @@ class SyncService {
})
}

_receiveSteps({ steps, document = null, sessions = [] }) {
receiveSteps({ steps, document = null, sessions = [] }) {
const awareness = sessions
.filter(s => s.lastContact > (Math.floor(Date.now() / 1000) - COLLABORATOR_DISCONNECT_TIME))
.filter(s => s.lastAwarenessMessage)
Expand Down