mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fix guest state sync
This commit is contained in:
parent
83bd78f467
commit
a57827458d
2 changed files with 7 additions and 3 deletions
|
@ -101,7 +101,7 @@
|
|||
review-panel-toggle(
|
||||
ng-model="reviewPanel.trackChangesOnForGuests"
|
||||
on-toggle="toggleTrackChangesForGuests(isOn);"
|
||||
disabled="!project.features.trackChanges || !permissions.write || !trackChangesForGuestsAvailable"
|
||||
disabled="!project.features.trackChanges || !permissions.write || !reviewPanel.trackChangesForGuestsAvailable"
|
||||
)
|
||||
|
||||
.rp-entry-list(
|
||||
|
|
|
@ -82,8 +82,8 @@ define [
|
|||
|
||||
$scope.$watch 'project.publicAccesLevel', (level) ->
|
||||
if level?
|
||||
available = $scope.trackChangesForGuestsAvailable = level == 'tokenBased'
|
||||
if !available
|
||||
$scope.reviewPanel.trackChangesForGuestsAvailable = level == 'tokenBased'
|
||||
if !$scope.reviewPanel.trackChangesForGuestsAvailable
|
||||
$scope.trackChangesOnForThisGuestClient = false
|
||||
$scope.toggleTrackChangesForGuests false
|
||||
|
||||
|
@ -638,6 +638,10 @@ define [
|
|||
)
|
||||
$scope.trackChangesOnForThisGuestClient = newValue
|
||||
_setUserTCState(ide.$scope.user.id, newValue, isLocal)
|
||||
else
|
||||
$scope.reviewPanel.trackChangesOnForGuests = false
|
||||
$scope.trackChangesOnForThisGuestClient = false
|
||||
_setUserTCState(ide.$scope.user.id, false, isLocal)
|
||||
|
||||
applyClientTrackChangesStateToServer = () ->
|
||||
data = {}
|
||||
|
|
Loading…
Reference in a new issue