Ver código fonte

fix(api): enable the external api before the first redux update

For the external api to fire update events out of the iframe, it
must first be initialized within the jitsi app. Any invocations
by the app to send updates events before initialization will
cause the api to swallow the events. The chosen fix is to
initialize the api earlier so the first update of app's redux
store fires update events that the api will also fire out of
the iframe.

This change will affect current behavior in that right now
the update event of the initial set of the avatar url is
blocked, but the change will make that event fire out of the
iframe.
master
Leonard Kim 6 anos atrás
pai
commit
d7e0aa3f61
1 arquivos alterados com 5 adições e 5 exclusões
  1. 5
    5
      react/features/base/app/actions.js

+ 5
- 5
react/features/base/app/actions.js Ver arquivo

@@ -17,11 +17,6 @@ declare var APP;
17 17
  */
18 18
 export function appWillMount(app: Object) {
19 19
     return (dispatch: Dispatch<any>) => {
20
-        dispatch({
21
-            type: APP_WILL_MOUNT,
22
-            app
23
-        });
24
-
25 20
         // TODO There was a redux action creator appInit which I did not like
26 21
         // because we already had the redux action creator appWillMount and,
27 22
         // respectively, the redux action APP_WILL_MOUNT. So I set out to remove
@@ -30,6 +25,11 @@ export function appWillMount(app: Object) {
30 25
         // API module into its own feature yet so we're bound to work on that in
31 26
         // the future.
32 27
         typeof APP === 'object' && APP.API.init();
28
+
29
+        dispatch({
30
+            type: APP_WILL_MOUNT,
31
+            app
32
+        });
33 33
     };
34 34
 }
35 35
 

Carregando…
Cancelar
Salvar