fix: joined show memebers sometimes
This commit is contained in:
@@ -36,7 +36,7 @@ const channelsSlice = createSlice({
|
||||
c.avatar_updated_at == 0
|
||||
? ""
|
||||
: `${BASE_URL}/resource/group_avatar?gid=${c.gid}&t=${c.avatar_updated_at}`,
|
||||
visibleAside: "members"
|
||||
visibleAside: state.byId[c.gid]?.visibleAside ?? null
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
@@ -18,7 +18,7 @@ type Props = {
|
||||
|
||||
const RTCWidget = ({ id, context = "channel" }: Props) => {
|
||||
const { t } = useTranslation("chat");
|
||||
const { leave, voicingInfo, setMute, setDeafen } = useVoice({ context, id });
|
||||
const { leave, voicingInfo, setMute, setDeafen, joining = true } = useVoice({ context, id });
|
||||
const { loginUser, channelData, userData } = useAppSelector(store => {
|
||||
return {
|
||||
userData: store.users.byId,
|
||||
@@ -26,7 +26,7 @@ const RTCWidget = ({ id, context = "channel" }: Props) => {
|
||||
loginUser: store.authData.user,
|
||||
};
|
||||
});
|
||||
if (!loginUser || !voicingInfo) return null;
|
||||
if (!loginUser || !voicingInfo || joining) return null;
|
||||
const name = voicingInfo.context == "channel" ? channelData[voicingInfo.id]?.name : userData[voicingInfo.id]?.name;
|
||||
if (!name) return null;
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user