Merge pull request #8703 from overleaf/ae-threads-loaded

Ensure that the loaded_threads event isn't dispatched for read-only link sharing users

GitOrigin-RevId: e03581f29f1a0aff122c3c16f4f6a3b70293c301
This commit is contained in:
Alf Eaton 2022-07-04 14:10:40 +01:00 committed by Copybot
parent cc9b490ef6
commit 4657465c0d

View file

@ -488,15 +488,14 @@ export default App.controller(
}
}
if (
rangesTracker.comments.length > 0 &&
!window.isRestrictedTokenMember
) {
ensureThreadsAreLoaded()
} else {
// ensure that tracked changes are highlighted even if no comments are loaded
ide.$scope.loadingThreads = false
dispatchReviewPanelEvent('loaded_threads')
if (!window.isRestrictedTokenMember) {
if (rangesTracker.comments.length > 0) {
ensureThreadsAreLoaded()
} else {
// ensure that tracked changes are highlighted even if no comments are loaded
ide.$scope.loadingThreads = false
dispatchReviewPanelEvent('loaded_threads')
}
}
for (const comment of Array.from(rangesTracker.comments)) {