Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix: Batch actions.
Hristo Terezov4aea40d34f58
diff --git a/react/features/speaker-stats/middleware.ts b/react/features/speaker-stats/middleware.tsindex 6b8bbf8840..c8a7dafef5 100644--- a/react/features/speaker-stats/middleware.ts+++ b/react/features/speaker-stats/middleware.ts@@ -1,3 +1,4 @@+import { batch } from 'react-redux';import { AnyAction } from 'redux';import { IStore } from '../app/types';@@ -49,11 +50,14 @@ MiddlewareRegistry.register(({ dispatch, getState }: IStore) => (next: Function)const stats = filterBySearchCriteria(state, speakerStats);const pendingReorder = getPendingReorder(state);- if (pendingReorder) {- dispatch(updateSortedSpeakerStatsIds(getSortedSpeakerStatsIds(state, stats) ?? []));- }+ batch(() => {+ if (pendingReorder) {+ dispatch(updateSortedSpeakerStatsIds(getSortedSpeakerStatsIds(state, stats) ?? []));+ }++ dispatch(updateStats(stats));+ });- dispatch(updateStats(stats));}break;diff --git a/react/features/transcribing/middleware.ts b/react/features/transcribing/middleware.tsindex 43f49d4005..0122afa201 100644--- a/react/features/transcribing/middleware.ts+++ b/react/features/transcribing/middleware.ts@@ -1,3 +1,5 @@+import { batch } from 'react-redux';+import {HIDDEN_PARTICIPANT_JOINED,HIDDEN_PARTICIPANT_LEFT,@@ -64,8 +66,10 @@ MiddlewareRegistry.register(store => next => action => {if (potentialTranscriberJIDs.includes(participant.id)&& participant.name === TRANSCRIBER_DISPLAY_NAME) {- store.dispatch(transcriberJoined(participant.id));- store.dispatch(hidePendingTranscribingNotification());+ batch(() => {+ store.dispatch(transcriberJoined(participant.id));+ store.dispatch(hidePendingTranscribingNotification());+ });}break;