File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,6 +255,7 @@ export const CallProvider = (props: { children: JSX.Element }) => {
255255 } ;
256256
257257 useSocketListener ( 'voice:signal_received' , ( data : SignalPayload ) => {
258+ if ( ! joinedChannelId ) return ;
258259 const key = peerKey ( data . channelId , data . fromUserId ) ;
259260 const existingPeer = peersRef . current . get ( key ) ;
260261
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const CallUI = () => {
4040 call . endCall ( ) ;
4141 } ;
4242
43- return currentChannelId ( ) ? (
43+ return call . joinedChannelId ? (
4444 < View style = { style . container } >
4545 < View style = { style . voiceItems } >
4646 { channelVoiceUsers ( ) . map ( voice => (
@@ -51,18 +51,11 @@ export const CallUI = () => {
5151 />
5252 ) ) }
5353 </ View >
54- { /* {call.joinedChannelId !== currentChannelId() ? (
55- <Button title="Call" onPress={handleCall} />
56- ) : (
57- <Button title="End Call" onPress={handleEndCall} />
58- )} */ }
59-
60- { call . joinedChannelId ? (
61- < View style = { style . controls } >
62- < Button title = "End Call" onPress = { handleEndCall } color = "red" />
63- < Button title = "Toggle Speaker" onPress = { call . toggleSpeaker } />
64- </ View >
65- ) : null }
54+
55+ < View style = { style . controls } >
56+ < Button title = "End Call" onPress = { handleEndCall } color = "red" />
57+ < Button title = "Toggle Speaker" onPress = { call . toggleSpeaker } />
58+ </ View >
6659 </ View >
6760 ) : null ;
6861} ;
You can’t perform that action at this time.
0 commit comments