mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Only create single host view instance
This commit is contained in:
committed by
Kevin Sawicki
parent
af80327995
commit
601efa53e6
@@ -5,6 +5,8 @@ JoinPromptView = require './join-prompt-view'
|
||||
|
||||
module.exports =
|
||||
activate: ->
|
||||
hostView = null
|
||||
|
||||
if atom.getLoadSettings().sessionId
|
||||
new GuestView(atom.guestSession)
|
||||
else
|
||||
@@ -15,7 +17,7 @@ module.exports =
|
||||
pasteboard.write(sessionId) if sessionId
|
||||
|
||||
rootView.command 'collaboration:start-session', ->
|
||||
new HostView(hostSession)
|
||||
hostView ?= new HostView(hostSession)
|
||||
if sessionId = hostSession.start()
|
||||
pasteboard.write(sessionId)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user