From 34a296747bd59d2c309c3f64df5c6afeafe532f3 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Thu, 10 Feb 2022 13:23:36 +0000 Subject: [PATCH] Merge pull request #6695 from overleaf/ae-cm6-review-panel-timing [web] [cm6] Improve track changes extension timings GitOrigin-RevId: 6e374b785daf14bd4d4576747faa0a9b20c4d346 --- .../controllers/ReviewPanelController.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/web/frontend/js/ide/review-panel/controllers/ReviewPanelController.js b/services/web/frontend/js/ide/review-panel/controllers/ReviewPanelController.js index 3729959f3e..e3287d11da 100644 --- a/services/web/frontend/js/ide/review-panel/controllers/ReviewPanelController.js +++ b/services/web/frontend/js/ide/review-panel/controllers/ReviewPanelController.js @@ -520,21 +520,21 @@ export default App.controller( } if (changed) { - return $scope.$broadcast('entries:changed') + // TODO: unused? + $scope.$broadcast('entries:changed') } + + return entries } $scope.$on('editor:track-changes:changed', function () { const doc_id = $scope.editor.open_doc_id - updateEntries(doc_id) + const entries = updateEntries(doc_id) // For now, not worrying about entry panels for rich text if (!$scope.editor.showRichText) { $scope.$broadcast('review-panel:recalculate-screen-positions') - dispatchReviewPanelEvent( - 'recalculate-screen-positions', - getDocEntries($scope.editor.open_doc_id) - ) + dispatchReviewPanelEvent('recalculate-screen-positions', entries) return $scope.$broadcast('review-panel:layout') }