Merge pull request #8708 from overleaf/ae-loading-threads-fix

Only dispatch the loaded_threads event once

GitOrigin-RevId: d9b8bf4a84d115fcc00edbf1901565ddb407c8be
This commit is contained in:
Alf Eaton 2022-07-04 15:42:56 +01:00 committed by Copybot
parent 4657465c0d
commit 0b942bd8a8

View file

@ -491,7 +491,7 @@ export default App.controller(
if (!window.isRestrictedTokenMember) { if (!window.isRestrictedTokenMember) {
if (rangesTracker.comments.length > 0) { if (rangesTracker.comments.length > 0) {
ensureThreadsAreLoaded() ensureThreadsAreLoaded()
} else { } else if (ide.$scope.loadingThreads === true) {
// ensure that tracked changes are highlighted even if no comments are loaded // ensure that tracked changes are highlighted even if no comments are loaded
ide.$scope.loadingThreads = false ide.$scope.loadingThreads = false
dispatchReviewPanelEvent('loaded_threads') dispatchReviewPanelEvent('loaded_threads')