mirror of https://github.com/jitsi/jitsi-meet
In order to accommodate the requirements of the work on supporting XMPP authentication on mobile/react-native, make dealing with Dialog a little more generic and a little easier.pull/1976/head jitsi-meet_2458
parent
088fe87e31
commit
9c47a7e972
@ -0,0 +1,17 @@ |
||||
/* @flow */ |
||||
|
||||
import { toState } from '../redux'; |
||||
|
||||
/** |
||||
* Checks if a <tt>Dialog</tt> with a specific <tt>component</tt> is currently |
||||
* open. |
||||
* |
||||
* @param {Function|Object} stateful - The redux store, the redux |
||||
* <tt>getState</tt> function, or the redux state itself. |
||||
* @param {React.Component} component - The <tt>component</tt> of a |
||||
* <tt>Dialog</tt> to be checked. |
||||
* @returns {boolean} |
||||
*/ |
||||
export function isDialogOpen(stateful: Function | Object, component: Object) { |
||||
return toState(stateful)['features/base/dialog'].component === component; |
||||
} |
@ -1,5 +1,6 @@ |
||||
export * from './actions'; |
||||
export * from './actionTypes'; |
||||
export * from './components'; |
||||
export * from './functions'; |
||||
|
||||
import './reducer'; |
||||
|
Loading…
Reference in new issue