Skip to content

Commit

Permalink
cleanup(SyncService): this.sessions and this.steps
Browse files Browse the repository at this point in the history
Both were kept up to date but never used as far as i can tell.

Signed-off-by: Max <max@nextcloud.com>
  • Loading branch information
max-nextcloud committed Feb 16, 2023
1 parent 5e41593 commit 2fefbe2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/services/SyncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ class SyncService {
this._api = new SessionApi(options)
this.connection = null

this.sessions = []

this.steps = []
this.stepClientIDs = []

this.lastStepPush = Date.now()
Expand All @@ -87,9 +84,6 @@ class SyncService {
}

async open({ fileId, initialSession }) {
this.on('change', ({ sessions }) => {
this.sessions = sessions
})

// TODO: Only continue if a connection was made
this.connection = initialSession
Expand Down Expand Up @@ -178,7 +172,6 @@ class SyncService {
return { step: s.lastAwarenessMessage, clientId: s.clientId }
})
const newSteps = awareness
this.steps = [...this.steps, ...awareness.map(s => s.step)]
for (let i = 0; i < steps.length; i++) {
const singleSteps = steps[i].data
if (this.version < steps[i].version) {
Expand All @@ -190,7 +183,6 @@ class SyncService {
continue
}
singleSteps.forEach(step => {
this.steps.push(step)
newSteps.push({
step,
clientID: steps[i].sessionId,
Expand Down

0 comments on commit 2fefbe2

Please sign in to comment.