2020-05-20 08:25:31 +00:00
|
|
|
// @flow
|
|
|
|
|
2021-09-23 09:12:31 +00:00
|
|
|
import { type Dispatch } from 'redux';
|
|
|
|
|
|
|
|
import { appNavigate } from '../app/actions';
|
2020-05-20 08:25:31 +00:00
|
|
|
import { openDialog } from '../base/dialog';
|
|
|
|
|
|
|
|
import { DisableLobbyModeDialog, EnableLobbyModeDialog } from './components/native';
|
|
|
|
|
2021-09-23 09:12:31 +00:00
|
|
|
export * from './actions.any';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cancels the ongoing knocking and abandons the join flow.
|
|
|
|
*
|
|
|
|
* @returns {Function}
|
|
|
|
*/
|
|
|
|
export function cancelKnocking() {
|
|
|
|
return async (dispatch: Dispatch<any>) => {
|
|
|
|
dispatch(appNavigate(undefined));
|
|
|
|
};
|
|
|
|
}
|
2020-05-20 08:25:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Action to show the dialog to disable lobby mode.
|
|
|
|
*
|
|
|
|
* @returns {showNotification}
|
|
|
|
*/
|
|
|
|
export function showDisableLobbyModeDialog() {
|
|
|
|
return openDialog(DisableLobbyModeDialog);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Action to show the dialog to enable lobby mode.
|
|
|
|
*
|
|
|
|
* @returns {showNotification}
|
|
|
|
*/
|
|
|
|
export function showEnableLobbyModeDialog() {
|
|
|
|
return openDialog(EnableLobbyModeDialog);
|
|
|
|
}
|