Explorar el Código

Fix raise hand toggled state

master
yanas hace 8 años
padre
commit
1d34a50d2f

+ 2
- 3
react/features/toolbox/actions.native.js Ver fichero

@@ -17,10 +17,9 @@ import {
17 17
 
18 18
 /**
19 19
  * FIXME: We should make sure all common functions for native and web are
20
- * separated in a global functions file, as well as all actions! Currently this
21
- * file contains actions that are imported in actions.web.
20
+ * merged in a global functions file.
22 21
  */
23
-import { getButton } from './functions.web';
22
+import { getButton } from './functions.native';
24 23
 
25 24
 /**
26 25
  * Event handler for local raise hand changed event.

+ 15
- 0
react/features/toolbox/functions.native.js Ver fichero

@@ -100,3 +100,18 @@ export function abstractMapStateToProps(state: Object): Object {
100 100
         _visible: visible
101 101
     };
102 102
 }
103
+
104
+/**
105
+ * Returns the button object corresponding to the given buttonName.
106
+ *
107
+ * @param {string} buttonName - The name of the button.
108
+ * @param {Object} state - The current state.
109
+ * @returns {Object} - The button object.
110
+ */
111
+export function getButton(buttonName: string, state: Object) {
112
+    const { primaryToolbarButtons, secondaryToolbarButtons }
113
+        = state['features/toolbox'];
114
+
115
+    return primaryToolbarButtons.get(buttonName)
116
+        || secondaryToolbarButtons.get(buttonName);
117
+}

+ 0
- 15
react/features/toolbox/functions.web.js Ver fichero

@@ -13,21 +13,6 @@ export { abstractMapStateToProps } from './functions.native';
13 13
 
14 14
 /* eslint-disable flowtype/space-before-type-colon */
15 15
 
16
-/**
17
- * Returns the button object corresponding to the given buttonName.
18
- *
19
- * @param {string} buttonName - The name of the button.
20
- * @param {Object} state - The current state.
21
- * @returns {Object} - The button object.
22
- */
23
-export function getButton(buttonName: string, state: Object) {
24
-    const { primaryToolbarButtons, secondaryToolbarButtons }
25
-        = state['features/toolbox'];
26
-
27
-    return primaryToolbarButtons.get(buttonName)
28
-        || secondaryToolbarButtons.get(buttonName);
29
-}
30
-
31 16
 /**
32 17
  * Takes toolbar button props and maps them to HTML attributes to set.
33 18
  *

Loading…
Cancelar
Guardar