mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Ensure that tracked changes are highlighted in read-only mode (#18036)
GitOrigin-RevId: 5010e1649d8f15014f9c8ef578073be7c6545aa4
This commit is contained in:
parent
98cefaa5bd
commit
905c9b2c28
1 changed files with 8 additions and 10 deletions
|
@ -428,17 +428,15 @@ function useReviewPanelState(): ReviewPanel.ReviewPanelState {
|
||||||
|
|
||||||
let localResolvedThreadIds = resolvedThreadIds
|
let localResolvedThreadIds = resolvedThreadIds
|
||||||
|
|
||||||
if (!isRestrictedTokenMember) {
|
if (!isRestrictedTokenMember && rangesTracker.comments.length > 0) {
|
||||||
if (rangesTracker.comments.length > 0) {
|
const threadsLoadResult = await ensureThreadsAreLoaded()
|
||||||
const threadsLoadResult = await ensureThreadsAreLoaded()
|
if (threadsLoadResult?.resolvedThreadIds) {
|
||||||
if (threadsLoadResult?.resolvedThreadIds) {
|
localResolvedThreadIds = threadsLoadResult.resolvedThreadIds
|
||||||
localResolvedThreadIds = threadsLoadResult.resolvedThreadIds
|
|
||||||
}
|
|
||||||
} else if (loadingThreads) {
|
|
||||||
// ensure that tracked changes are highlighted even if no comments are loaded
|
|
||||||
setLoadingThreads(false)
|
|
||||||
dispatchReviewPanelEvent('loaded_threads')
|
|
||||||
}
|
}
|
||||||
|
} else if (loadingThreads) {
|
||||||
|
// ensure that tracked changes are highlighted even if no comments are loaded
|
||||||
|
setLoadingThreads(false)
|
||||||
|
dispatchReviewPanelEvent('loaded_threads')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!loadingThreadsInProgressRef.current) {
|
if (!loadingThreadsInProgressRef.current) {
|
||||||
|
|
Loading…
Reference in a new issue