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.
This commit is contained in:
parent
664552bc05
commit
c028511aaf
|
@ -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<any>) => {
|
||||
dispatch(appNavigate(undefined));
|
||||
return dispatch => {
|
||||
batch(() => {
|
||||
dispatch(setKnockingState(false));
|
||||
dispatch(hideLobbyScreen());
|
||||
dispatch(appNavigate(undefined));
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue