fix(ui) - assist disable remote on disconnect

This commit is contained in:
Shekar Siri 2022-02-24 18:45:50 +01:00
parent 09430d0868
commit db2b430733
2 changed files with 2 additions and 13 deletions

View file

@ -91,12 +91,6 @@ function AssistActions({ toggleChatWindow, userId, calling, peerConnectionStatus
onClick={ requestReleaseRemoteControl }
role="button"
>
{/* <Icon
name="remote-control"
size="20"
color={ remoteControlStatus === RemoteControlStatus.Enabled ? "green" : "gray-darkest"}
/>
<span className={cn("ml-2", { 'color-green' : remoteControlStatus === RemoteControlStatus.Enabled })}>{ 'Remote Control' }</span> */}
<IconButton label={`${remoteActive ? 'Stop ' : ''} Remote Control`} icon="remote-control" primaryText redText={remoteActive} />
</div>
@ -112,12 +106,6 @@ function AssistActions({ toggleChatWindow, userId, calling, peerConnectionStatus
onClick={ onCall ? callObject?.end : confirmCall}
role="button"
>
{/* <Icon
name="headset"
size="20"
color={ onCall ? "red" : "gray-darkest" }
/>
<span className={cn("ml-2", { 'color-red' : onCall })}>{ onCall ? 'End Call' : 'Call' }</span> */}
<IconButton size="small" primary={!onCall} red={onCall} label={onCall ? 'End' : 'Call'} icon="headset" />
</div>
}

View file

@ -171,7 +171,8 @@ export default class AssistManager {
this.setStatus(ConnectionStatus.Disconnected)
}, 12000)
if (getState().remoteControl === RemoteControlStatus.Requesting) {
if (getState().remoteControl === RemoteControlStatus.Requesting ||
getState().remoteControl === RemoteControlStatus.Enabled) {
this.toggleRemoteControl(false)
}