Consolidate some watchers.

This commit is contained in:
Paulo Reis 2017-05-11 10:23:41 +01:00
parent a3ab994ab3
commit f2dac28a65

View file

@ -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()