Make sure TC state is applied to all users on load.

This commit is contained in:
Paulo Reis 2017-08-01 11:30:23 +01:00
parent fbce49f5cd
commit 029ab8d2f1

View file

@ -610,10 +610,9 @@ define [
_setEveryoneTCState = (newValue, isLocal = false) -> _setEveryoneTCState = (newValue, isLocal = false) ->
$scope.reviewPanel.trackChangesOnForEveryone = newValue $scope.reviewPanel.trackChangesOnForEveryone = newValue
for userId, userState of $scope.reviewPanel.trackChangesState for member in $scope.project.members
userState.value = newValue _setUserTCState(member._id, newValue, isLocal)
userState.syncState = if isLocal then UserTCSyncState.PENDING else UserTCSyncState.SYNCED _setUserTCState($scope.project.owner._id, newValue, isLocal)
$scope.editor.wantTrackChanges = newValue
applyClientTrackChangesStateToServer = () -> applyClientTrackChangesStateToServer = () ->
if $scope.reviewPanel.trackChangesOnForEveryone if $scope.reviewPanel.trackChangesOnForEveryone