Skip to content
Merged
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): drop superfluous update message
Updates now include all the local structs
that were not yet received from remote.

No need to compute a separate update message anymore.

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud authored and mejo- committed Nov 27, 2024
commit acfd53570e99497f63ac87cc6beb6321ec5ebccd
8 changes: 1 addition & 7 deletions src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ import {
import ReadonlyBar from './Menu/ReadonlyBar.vue'

import { logger } from '../helpers/logger.js'
import { getDocumentState, applyDocumentState, getUpdateMessage } from '../helpers/yjs.js'
import { getDocumentState, applyDocumentState } from '../helpers/yjs.js'
import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService.js'
import createSyncServiceProvider from './../services/SyncServiceProvider.js'
import AttachmentResolver from './../services/AttachmentResolver.js'
Expand Down Expand Up @@ -506,12 +506,6 @@ export default {
onLoaded({ document, documentSource, documentState }) {
if (documentState) {
applyDocumentState(this.$ydoc, documentState, this.$providers[0])
// distribute additional state that may exist locally
const updateMessage = getUpdateMessage(this.$ydoc, documentState)
if (updateMessage) {
logger.debug('onLoaded: Pushing local changes to server')
this.$queue.push(updateMessage)
}
} else {
this.setInitialYjsState(documentSource, { isRichEditor: this.isRichEditor })
}
Expand Down