From f503bd7352f4374e9774c3774d6a4657edfb72a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 29 Mar 2022 14:30:34 +0200 Subject: [PATCH] fix(rn,lobby) fix lobby not showing up on subsequent tries We need to make sure to hide it explicitly so the Redux state is in sync with reality. --- react/features/lobby/actions.native.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/react/features/lobby/actions.native.js b/react/features/lobby/actions.native.js index e95a226a1..b8528f973 100644 --- a/react/features/lobby/actions.native.js +++ b/react/features/lobby/actions.native.js @@ -1,9 +1,9 @@ -// @flow - -import { type Dispatch } from 'redux'; +import { batch } from 'react-redux'; import { appNavigate } from '../app/actions'; +import { hideLobbyScreen, setKnockingState } from './actions.any'; + export * from './actions.any'; /** @@ -12,8 +12,11 @@ export * from './actions.any'; * @returns {Function} */ export function cancelKnocking() { - return async (dispatch: Dispatch) => { - dispatch(appNavigate(undefined)); + return dispatch => { + batch(() => { + dispatch(setKnockingState(false)); + dispatch(hideLobbyScreen()); + dispatch(appNavigate(undefined)); + }); }; } -