[lib.channel-controller] remove WebSocket creation -> moved to [lib.room-controller] when the room is fetched then dumped (only when full dump(), with append: false)
This commit is contained in:
parent
5e5fff8545
commit
983fe0073b
|
@ -47,9 +47,6 @@ export default class ChannelController{
|
|||
/* (5) Load rooms */
|
||||
gs.get.room.fetch();
|
||||
|
||||
/* (6) Open channel websocket */
|
||||
gs.get.content.ws_connect();
|
||||
|
||||
|
||||
/* (6) Log channel */
|
||||
// console.log(`[channel.current] ${channel.link} (${channel.label})`);
|
||||
|
|
|
@ -47,7 +47,7 @@ export default class RoomController{
|
|||
this[type].current = room.id;
|
||||
|
||||
/* (5) Tell websocket: new text room */
|
||||
if( type === 'text' && csock instanceof wscd )
|
||||
if( type === 'text' && window.csock instanceof wscd )
|
||||
csock.send({ buffer: { rid: room.id } });
|
||||
|
||||
/* (6) Update buffer */
|
||||
|
@ -139,6 +139,11 @@ export default class RoomController{
|
|||
}
|
||||
}
|
||||
|
||||
/* (3) If full dump (append: false) -> create websocket */
|
||||
if( append !== true )
|
||||
gs.get.content.ws_connect();
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue