fixed dispatch eslint errors
This commit is contained in:
@@ -65,7 +65,7 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
||||
const newSpeaktingParticipants = get().speakingParticipants.filter(
|
||||
(p) => !(p.identity === participant.identity),
|
||||
);
|
||||
set((state) => ({
|
||||
set(() => ({
|
||||
speakingParticipants: newSpeaktingParticipants,
|
||||
}));
|
||||
if (newSpeaktingParticipants.length === 0 && get().transmitBlocked) {
|
||||
@@ -77,8 +77,7 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
||||
set({ micDeviceId, micVolume });
|
||||
},
|
||||
toggleTalking: () => {
|
||||
const { room, isTalking, micDeviceId, micVolume, speakingParticipants, transmitBlocked } =
|
||||
get();
|
||||
const { room, isTalking, micDeviceId, speakingParticipants, transmitBlocked } = get();
|
||||
if (!room) return;
|
||||
|
||||
if (speakingParticipants.length > 0 && !isTalking && !transmitBlocked) {
|
||||
@@ -187,7 +186,7 @@ interface PTTData {
|
||||
}
|
||||
|
||||
const handlePTT = (data: PTTData) => {
|
||||
const { shouldTransmit, source } = data;
|
||||
const { shouldTransmit } = data;
|
||||
const { room, speakingParticipants } = useAudioStore.getState();
|
||||
if (!room) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user