mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Remove sharing ivar from Host Session
This commit is contained in:
@@ -15,7 +15,6 @@ class HostSession
|
||||
peer: null
|
||||
mediaConnection: null
|
||||
doc: null
|
||||
sharing: false
|
||||
|
||||
constructor: ->
|
||||
@doc = site.createDocument
|
||||
@@ -51,13 +50,11 @@ class HostSession
|
||||
|
||||
@peer.on 'connection', (connection) =>
|
||||
connection.on 'open', =>
|
||||
@sharing = true
|
||||
connection.send({repoSnapshot, doc: @doc.serialize()})
|
||||
sessionUtils.connectDocument(@doc, connection)
|
||||
@trigger 'started'
|
||||
|
||||
connection.on 'close', =>
|
||||
@sharing = false
|
||||
@participants.each (participant, index) =>
|
||||
if connection.peer is participant.get('id')
|
||||
@participants.remove(index)
|
||||
@@ -77,4 +74,4 @@ class HostSession
|
||||
@peer.id
|
||||
|
||||
isSharing: ->
|
||||
@sharing
|
||||
@peer? and not _.isEmpty(@peer.connections)
|
||||
|
||||
Reference in New Issue
Block a user