From a9f5829e58f7fe8fbc6adf0d859879fdd4e2deb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 18 Oct 2022 12:11:16 +0200 Subject: [PATCH] fix(rn,filmstrip) clear participants cache when changing conferences --- react/features/filmstrip/subscriber.native.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/react/features/filmstrip/subscriber.native.js b/react/features/filmstrip/subscriber.native.js index 13c0be24f..ac53366ad 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([])); + } + });