From e5191405dc84d5acfe8d073a692b3f46e0883e36 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 16 Feb 2023 20:13:21 +0100 Subject: [PATCH] cleanup(SyncService): this.sessions and this.steps Both were kept up to date but never used as far as i can tell. Signed-off-by: Max --- src/services/SyncService.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/services/SyncService.js b/src/services/SyncService.js index 136756c543a..2fae170f46a 100644 --- a/src/services/SyncService.js +++ b/src/services/SyncService.js @@ -71,9 +71,6 @@ class SyncService { this._api = new SessionApi(options) this.connection = null - this.sessions = [] - - this.steps = [] this.stepClientIDs = [] this.lastStepPush = Date.now() @@ -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 @@ -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) { @@ -190,7 +183,6 @@ class SyncService { continue } singleSteps.forEach(step => { - this.steps.push(step) newSteps.push({ step, clientID: steps[i].sessionId,