mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 21:31:36 +02:00
Ensure that tracked changes are highlighted in read-only mode (#18036)
GitOrigin-RevId: 5010e1649d8f15014f9c8ef578073be7c6545aa4
This commit is contained in:
@@ -428,17 +428,15 @@ function useReviewPanelState(): ReviewPanel.ReviewPanelState {
|
||||
|
||||
let localResolvedThreadIds = resolvedThreadIds
|
||||
|
||||
if (!isRestrictedTokenMember) {
|
||||
if (rangesTracker.comments.length > 0) {
|
||||
const threadsLoadResult = await ensureThreadsAreLoaded()
|
||||
if (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')
|
||||
if (!isRestrictedTokenMember && rangesTracker.comments.length > 0) {
|
||||
const threadsLoadResult = await ensureThreadsAreLoaded()
|
||||
if (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')
|
||||
}
|
||||
|
||||
if (!loadingThreadsInProgressRef.current) {
|
||||
|
||||
Reference in New Issue
Block a user