Przeglądaj źródła

rn: fix overriding user-selected server URL

Fixes: https://github.com/jitsi/jitsi-meet/issues/7373
master
Saúl Ibarra Corretgé 5 lat temu
rodzic
commit
16547b91a5
1 zmienionych plików z 8 dodań i 5 usunięć
  1. 8
    5
      react/features/app/components/App.native.js

+ 8
- 5
react/features/app/components/App.native.js Wyświetl plik

4
 
4
 
5
 import { setColorScheme } from '../../base/color-scheme';
5
 import { setColorScheme } from '../../base/color-scheme';
6
 import { DialogContainer } from '../../base/dialog';
6
 import { DialogContainer } from '../../base/dialog';
7
-import { CALL_INTEGRATION_ENABLED, SERVER_URL_CHANGE_ENABLED, updateFlags } from '../../base/flags';
7
+import { updateFlags } from '../../base/flags/actions';
8
+import { CALL_INTEGRATION_ENABLED, SERVER_URL_CHANGE_ENABLED } from '../../base/flags/constants';
9
+import { getFeatureFlag } from '../../base/flags/functions';
8
 import { Platform } from '../../base/react';
10
 import { Platform } from '../../base/react';
9
 import { DimensionsDetector, clientResized } from '../../base/responsive-ui';
11
 import { DimensionsDetector, clientResized } from '../../base/responsive-ui';
10
 import { updateSettings } from '../../base/settings';
12
 import { updateSettings } from '../../base/settings';
83
         super.componentDidMount();
85
         super.componentDidMount();
84
 
86
 
85
         this._init.then(() => {
87
         this._init.then(() => {
88
+            const { dispatch, getState } = this.state.store;
89
+
86
             // We set these early enough so then we avoid any unnecessary re-renders.
90
             // We set these early enough so then we avoid any unnecessary re-renders.
87
-            const { dispatch } = this.state.store;
91
+            dispatch(setColorScheme(this.props.colorScheme));
92
+            dispatch(updateFlags(this.props.flags));
88
 
93
 
89
             // Check if serverURL is configured externally and not allowed to change.
94
             // Check if serverURL is configured externally and not allowed to change.
90
-            const serverURLChangeEnabled = this.props.flags[SERVER_URL_CHANGE_ENABLED];
95
+            const serverURLChangeEnabled = getFeatureFlag(getState(), SERVER_URL_CHANGE_ENABLED, true);
91
 
96
 
92
             if (!serverURLChangeEnabled) {
97
             if (!serverURLChangeEnabled) {
93
                 // As serverURL is provided externally, so we push it to settings.
98
                 // As serverURL is provided externally, so we push it to settings.
100
                 }
105
                 }
101
             }
106
             }
102
 
107
 
103
-            dispatch(setColorScheme(this.props.colorScheme));
104
-            dispatch(updateFlags(this.props.flags));
105
             dispatch(updateSettings(this.props.userInfo || {}));
108
             dispatch(updateSettings(this.props.userInfo || {}));
106
 
109
 
107
             // Update settings with feature-flag.
110
             // Update settings with feature-flag.

Ładowanie…
Anuluj
Zapisz