mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
Tell other clients when threads are deleted
This commit is contained in:
parent
abb4ef14d8
commit
76328ff93f
1 changed files with 5 additions and 1 deletions
|
@ -66,6 +66,10 @@ define [
|
||||||
ide.socket.on "reopen-thread", (thread_id) ->
|
ide.socket.on "reopen-thread", (thread_id) ->
|
||||||
_onCommentReopened(thread_id)
|
_onCommentReopened(thread_id)
|
||||||
|
|
||||||
|
ide.socket.on "delete-thread", (thread_id) ->
|
||||||
|
_onThreadDeleted(thread_id)
|
||||||
|
$scope.$apply () ->
|
||||||
|
|
||||||
ide.socket.on "edit-message", (thread_id, message_id, content) ->
|
ide.socket.on "edit-message", (thread_id, message_id, content) ->
|
||||||
_onCommentEdited(thread_id, message_id, content)
|
_onCommentEdited(thread_id, message_id, content)
|
||||||
$scope.$apply () ->
|
$scope.$apply () ->
|
||||||
|
@ -372,6 +376,7 @@ define [
|
||||||
_onThreadDeleted = (thread_id) ->
|
_onThreadDeleted = (thread_id) ->
|
||||||
delete $scope.reviewPanel.resolvedThreadIds[thread_id]
|
delete $scope.reviewPanel.resolvedThreadIds[thread_id]
|
||||||
delete $scope.reviewPanel.commentThreads[thread_id]
|
delete $scope.reviewPanel.commentThreads[thread_id]
|
||||||
|
$scope.$broadcast "comment:remove", thread_id
|
||||||
|
|
||||||
_onCommentEdited = (thread_id, comment_id, content) ->
|
_onCommentEdited = (thread_id, comment_id, content) ->
|
||||||
thread = getThread(thread_id)
|
thread = getThread(thread_id)
|
||||||
|
@ -396,7 +401,6 @@ define [
|
||||||
'X-CSRF-Token': window.csrfToken
|
'X-CSRF-Token': window.csrfToken
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
$scope.$broadcast "comment:remove", entry_id
|
|
||||||
event_tracking.sendMB "rp-comment-delete"
|
event_tracking.sendMB "rp-comment-delete"
|
||||||
|
|
||||||
$scope.saveEdit = (thread_id, comment) ->
|
$scope.saveEdit = (thread_id, comment) ->
|
||||||
|
|
Loading…
Reference in a new issue