Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(rn,filmstrip) clear participants cache when changing conferences

Saúl Ibarra Corretgéa9f5829e58f7
diff --git a/react/features/filmstrip/subscriber.native.js b/react/features/filmstrip/subscriber.native.js
index 13c0be24f1..ac53366adf 100644
--- a/react/features/filmstrip/subscriber.native.js
+++ b/react/features/filmstrip/subscriber.native.js
@@ -3,7 +3,7 @@
import { StateListenerRegistry } from '../base/redux';
import { shouldDisplayTileView } from '../video-layout';
-import { setTileViewDimensions } from './actions';
+import { setRemoteParticipants, setTileViewDimensions } from './actions';
import { getTileViewParticipantCount } from './functions.native';
import './subscriber.any';
@@ -30,3 +30,14 @@ StateListenerRegistry.register(
store.dispatch(setTileViewDimensions());
}
});
+
+/**
+ * Listens for changes in the current conference and clears remote participants from this feature.
+ */
+StateListenerRegistry.register(
+ state => state['features/base/conference'].conference,
+ (conference, { dispatch }, previousConference) => {
+ if (conference !== previousConference) {
+ dispatch(setRemoteParticipants([]));
+ }
+ });