Fix raise hand toggled state
This commit is contained in:
parent
d1737745c2
commit
1d34a50d2f
|
@ -17,10 +17,9 @@ import {
|
|||
|
||||
/**
|
||||
* FIXME: We should make sure all common functions for native and web are
|
||||
* separated in a global functions file, as well as all actions! Currently this
|
||||
* file contains actions that are imported in actions.web.
|
||||
* merged in a global functions file.
|
||||
*/
|
||||
import { getButton } from './functions.web';
|
||||
import { getButton } from './functions.native';
|
||||
|
||||
/**
|
||||
* Event handler for local raise hand changed event.
|
||||
|
|
|
@ -100,3 +100,18 @@ export function abstractMapStateToProps(state: Object): Object {
|
|||
_visible: visible
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the button object corresponding to the given buttonName.
|
||||
*
|
||||
* @param {string} buttonName - The name of the button.
|
||||
* @param {Object} state - The current state.
|
||||
* @returns {Object} - The button object.
|
||||
*/
|
||||
export function getButton(buttonName: string, state: Object) {
|
||||
const { primaryToolbarButtons, secondaryToolbarButtons }
|
||||
= state['features/toolbox'];
|
||||
|
||||
return primaryToolbarButtons.get(buttonName)
|
||||
|| secondaryToolbarButtons.get(buttonName);
|
||||
}
|
||||
|
|
|
@ -13,21 +13,6 @@ export { abstractMapStateToProps } from './functions.native';
|
|||
|
||||
/* eslint-disable flowtype/space-before-type-colon */
|
||||
|
||||
/**
|
||||
* Returns the button object corresponding to the given buttonName.
|
||||
*
|
||||
* @param {string} buttonName - The name of the button.
|
||||
* @param {Object} state - The current state.
|
||||
* @returns {Object} - The button object.
|
||||
*/
|
||||
export function getButton(buttonName: string, state: Object) {
|
||||
const { primaryToolbarButtons, secondaryToolbarButtons }
|
||||
= state['features/toolbox'];
|
||||
|
||||
return primaryToolbarButtons.get(buttonName)
|
||||
|| secondaryToolbarButtons.get(buttonName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes toolbar button props and maps them to HTML attributes to set.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue