mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Use thread id in removeNewCommentRangeEffect (#23205)
GitOrigin-RevId: 6082f5e6d6f548eff43da657526097118a2d3c11
This commit is contained in:
@@ -19,7 +19,7 @@ import { v4 as uuid } from 'uuid'
|
||||
|
||||
export const addNewCommentRangeEffect = StateEffect.define<Range<Decoration>>()
|
||||
|
||||
export const removeNewCommentRangeEffect = StateEffect.define<Decoration>()
|
||||
export const removeNewCommentRangeEffect = StateEffect.define<string>()
|
||||
|
||||
export const textSelectedEffect = StateEffect.define<null>()
|
||||
|
||||
@@ -103,11 +103,10 @@ export const reviewTooltipStateField = StateField.define<{
|
||||
|
||||
for (const effect of tr.effects) {
|
||||
if (effect.is(removeNewCommentRangeEffect)) {
|
||||
const rangeToRemove = effect.value
|
||||
const threadId = effect.value
|
||||
addCommentRanges = addCommentRanges.update({
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
filter: (from, to, value) => {
|
||||
return value.spec.id !== rangeToRemove.spec.id
|
||||
filter: (_from, _to, value) => {
|
||||
return value.spec.id !== threadId
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user