Merge pull request #17128 from overleaf/em-filter-out-comments

Do not send comments to project-history when ranges support is disabled

GitOrigin-RevId: 0c5e5e2c98ea3c2830ba4d5d114bf4730b440440
This commit is contained in:
Eric Mc Sween
2024-02-16 07:40:13 -05:00
committed by Copybot
parent 8c339045b3
commit b55bdf7ced
6 changed files with 226 additions and 181 deletions

View File

@@ -1,3 +1,4 @@
// @ts-check
/**
* The purpose of this class is to track a set of inserts and deletes to a document, like
* track changes in Word. We store these as a set of ShareJs style ranges:
@@ -44,8 +45,21 @@ class RangesTracker {
comments = []
}
this.comments = comments
this.setIdSeed(RangesTracker.generateIdSeed())
this.resetDirtyState()
this.track_changes = false
this.id_seed = RangesTracker.generateIdSeed()
this.id_increment = 0
this._dirtyState = {
comment: {
moved: {},
removed: {},
added: {},
},
change: {
moved: {},
removed: {},
added: {},
},
}
}
getIdSeed() {