fix: channel aside visible while logout
This commit is contained in:
@@ -57,11 +57,11 @@ const Voice = () => {
|
||||
});
|
||||
//remote user leave
|
||||
agoraEngine.on("user-left", (user, reason) => {
|
||||
console.log(user, "has left the channel");
|
||||
switch (reason) {
|
||||
case "Quit":
|
||||
case "ServerTimeOut": {
|
||||
dispatch(removeVoiceMember(+user.uid as number));
|
||||
console.log(user, "has left the channel");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -206,6 +206,7 @@ const useVoice = ({ id, context = "channel" }: VoiceProps) => {
|
||||
dispatch(updateChannelVisibleAside({
|
||||
id, aside: null
|
||||
}));
|
||||
// 即时更新对应的活跃列表信息
|
||||
dispatch(upsertVoiceList({
|
||||
id,
|
||||
context,
|
||||
|
||||
Reference in New Issue
Block a user