mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-05 10:40:22 +00:00
Consolidate some watchers.
This commit is contained in:
parent
a3ab994ab3
commit
f2dac28a65
1 changed files with 4 additions and 7 deletions
|
@ -141,7 +141,10 @@ define [
|
|||
else
|
||||
# Reset back to what we had when previously open
|
||||
$scope.reviewPanel.subView = $scope.reviewPanel.openSubView
|
||||
|
||||
$timeout () ->
|
||||
$scope.$broadcast "review-panel:toggle"
|
||||
$scope.$broadcast "review-panel:layout", false
|
||||
|
||||
$scope.$watch "reviewPanel.subView", (view) ->
|
||||
return if !view?
|
||||
updateScrollbar()
|
||||
|
@ -171,12 +174,6 @@ define [
|
|||
), (nEntries) ->
|
||||
$scope.reviewPanel.hasEntries = nEntries > 0 and $scope.project.features.trackChangesVisible
|
||||
|
||||
$scope.$watch "ui.reviewPanelOpen", (reviewPanelOpen) ->
|
||||
return if !reviewPanelOpen?
|
||||
$timeout () ->
|
||||
$scope.$broadcast "review-panel:toggle"
|
||||
$scope.$broadcast "review-panel:layout", false
|
||||
|
||||
regenerateTrackChangesId = (doc) ->
|
||||
old_id = getChangeTracker(doc.doc_id).getIdSeed()
|
||||
new_id = RangesTracker.generateIdSeed()
|
||||
|
|
Loading…
Reference in a new issue