Bladeren bron

fix(rn,sdk) remove deprecated color scheme prop

It has been non-functional for a while.
master
Saúl Ibarra Corretgé 3 jaren geleden
bovenliggende
commit
f6f7406d24

+ 0
- 30
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetConferenceOptions.java Bestand weergeven

45
      */
45
      */
46
     private String token;
46
     private String token;
47
 
47
 
48
-    /**
49
-     * Color scheme override, see: https://github.com/jitsi/jitsi-meet/blob/dbedee5e22e5dcf9c92db96ef5bb3c9982fc526d/react/features/base/color-scheme/defaultScheme.js
50
-     */
51
-    private Bundle colorScheme;
52
-
53
     /**
48
     /**
54
      * Config. See: https://github.com/jitsi/jitsi-meet/blob/master/config.js
49
      * Config. See: https://github.com/jitsi/jitsi-meet/blob/master/config.js
55
      */
50
      */
77
         return token;
72
         return token;
78
     }
73
     }
79
 
74
 
80
-    public Bundle getColorScheme() {
81
-        return colorScheme;
82
-    }
83
-
84
     public Bundle getFeatureFlags() {
75
     public Bundle getFeatureFlags() {
85
         return featureFlags;
76
         return featureFlags;
86
     }
77
     }
97
         private String room;
88
         private String room;
98
         private String token;
89
         private String token;
99
 
90
 
100
-        private Bundle colorScheme;
101
         private Bundle config;
91
         private Bundle config;
102
         private Bundle featureFlags;
92
         private Bundle featureFlags;
103
 
93
 
152
             return this;
142
             return this;
153
         }
143
         }
154
 
144
 
155
-        /**
156
-         * Sets the color scheme override so the app is themed. See:
157
-         * https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/color-scheme/defaultScheme.js
158
-         * for the structure.
159
-         * @param colorScheme - A color scheme to be applied to the app.
160
-         * @return - The {@link Builder} object itself so the method calls can be chained.
161
-         */
162
-        public Builder setColorScheme(Bundle colorScheme) {
163
-            this.colorScheme = colorScheme;
164
-
165
-            return this;
166
-        }
167
-
168
         /**
145
         /**
169
          * Indicates the conference will be joined with the microphone muted.
146
          * Indicates the conference will be joined with the microphone muted.
170
          * @param audioMuted - Muted indication.
147
          * @param audioMuted - Muted indication.
276
             options.serverURL = this.serverURL;
253
             options.serverURL = this.serverURL;
277
             options.room = this.room;
254
             options.room = this.room;
278
             options.token = this.token;
255
             options.token = this.token;
279
-            options.colorScheme = this.colorScheme;
280
             options.config = this.config;
256
             options.config = this.config;
281
             options.featureFlags = this.featureFlags;
257
             options.featureFlags = this.featureFlags;
282
             options.userInfo = this.userInfo;
258
             options.userInfo = this.userInfo;
292
         serverURL = (URL) in.readSerializable();
268
         serverURL = (URL) in.readSerializable();
293
         room = in.readString();
269
         room = in.readString();
294
         token = in.readString();
270
         token = in.readString();
295
-        colorScheme = in.readBundle();
296
         config = in.readBundle();
271
         config = in.readBundle();
297
         featureFlags = in.readBundle();
272
         featureFlags = in.readBundle();
298
         userInfo = new JitsiMeetUserInfo(in.readBundle());
273
         userInfo = new JitsiMeetUserInfo(in.readBundle());
308
 
283
 
309
         props.putBundle("flags", featureFlags);
284
         props.putBundle("flags", featureFlags);
310
 
285
 
311
-        if (colorScheme != null) {
312
-            props.putBundle("colorScheme", colorScheme);
313
-        }
314
-
315
         Bundle urlProps = new Bundle();
286
         Bundle urlProps = new Bundle();
316
 
287
 
317
         // The room is fully qualified
288
         // The room is fully qualified
360
         dest.writeSerializable(serverURL);
331
         dest.writeSerializable(serverURL);
361
         dest.writeString(room);
332
         dest.writeString(room);
362
         dest.writeString(token);
333
         dest.writeString(token);
363
-        dest.writeBundle(colorScheme);
364
         dest.writeBundle(config);
334
         dest.writeBundle(config);
365
         dest.writeBundle(featureFlags);
335
         dest.writeBundle(featureFlags);
366
         dest.writeBundle(userInfo != null ? userInfo.asBundle() : new Bundle());
336
         dest.writeBundle(userInfo != null ? userInfo.asBundle() : new Bundle());

+ 0
- 7
ios/sdk/src/JitsiMeetConferenceOptions.h Bestand weergeven

34
  */
34
  */
35
 @property (nonatomic, copy, nullable) NSString *token;
35
 @property (nonatomic, copy, nullable) NSString *token;
36
 
36
 
37
-/**
38
- * Color scheme override, see:
39
- * https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/color-scheme/defaultScheme.js
40
- */
41
-@property (nonatomic, copy, nullable) NSDictionary *colorScheme;
42
-
43
 /**
37
 /**
44
  * Feature flags. See: https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.js
38
  * Feature flags. See: https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.js
45
  */
39
  */
82
 @property (nonatomic, copy, nullable, readonly) NSString *room;
76
 @property (nonatomic, copy, nullable, readonly) NSString *room;
83
 @property (nonatomic, copy, nullable, readonly) NSString *token;
77
 @property (nonatomic, copy, nullable, readonly) NSString *token;
84
 
78
 
85
-@property (nonatomic, copy, nullable) NSDictionary *colorScheme;
86
 @property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
79
 @property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
87
 
80
 
88
 @property (nonatomic, readonly) BOOL welcomePageEnabled;
81
 @property (nonatomic, readonly) BOOL welcomePageEnabled;

+ 0
- 7
ios/sdk/src/JitsiMeetConferenceOptions.m Bestand weergeven

38
         _room = nil;
38
         _room = nil;
39
         _token = nil;
39
         _token = nil;
40
 
40
 
41
-        _colorScheme = nil;
42
         _config = [[NSMutableDictionary alloc] init];
41
         _config = [[NSMutableDictionary alloc] init];
43
         _featureFlags = [[NSMutableDictionary alloc] init];
42
         _featureFlags = [[NSMutableDictionary alloc] init];
44
 
43
 
134
         _room = builder.room;
133
         _room = builder.room;
135
         _token = builder.token;
134
         _token = builder.token;
136
 
135
 
137
-        _colorScheme = builder.colorScheme;
138
-
139
         _config = builder.config;
136
         _config = builder.config;
140
 
137
 
141
         _featureFlags = [NSDictionary dictionaryWithDictionary:builder.featureFlags];
138
         _featureFlags = [NSDictionary dictionaryWithDictionary:builder.featureFlags];
161
 
158
 
162
     props[@"flags"] = [NSMutableDictionary dictionaryWithDictionary:_featureFlags];
159
     props[@"flags"] = [NSMutableDictionary dictionaryWithDictionary:_featureFlags];
163
 
160
 
164
-    if (_colorScheme != nil) {
165
-        props[@"colorScheme"] = self.colorScheme;
166
-    }
167
-
168
     NSMutableDictionary *urlProps = [[NSMutableDictionary alloc] init];
161
     NSMutableDictionary *urlProps = [[NSMutableDictionary alloc] init];
169
 
162
 
170
     // The room is fully qualified.
163
     // The room is fully qualified.

+ 0
- 2
react/features/app/components/App.native.js Bestand weergeven

3
 import React from 'react';
3
 import React from 'react';
4
 import SplashScreen from 'react-native-splash-screen';
4
 import SplashScreen from 'react-native-splash-screen';
5
 
5
 
6
-import { setColorScheme } from '../../base/color-scheme';
7
 import { DialogContainer } from '../../base/dialog';
6
 import { DialogContainer } from '../../base/dialog';
8
 import { updateFlags } from '../../base/flags/actions';
7
 import { updateFlags } from '../../base/flags/actions';
9
 import { CALL_INTEGRATION_ENABLED, SERVER_URL_CHANGE_ENABLED } from '../../base/flags/constants';
8
 import { CALL_INTEGRATION_ENABLED, SERVER_URL_CHANGE_ENABLED } from '../../base/flags/constants';
91
             const { dispatch, getState } = this.state.store;
90
             const { dispatch, getState } = this.state.store;
92
 
91
 
93
             // We set these early enough so then we avoid any unnecessary re-renders.
92
             // We set these early enough so then we avoid any unnecessary re-renders.
94
-            dispatch(setColorScheme(this.props.colorScheme));
95
             dispatch(updateFlags(this.props.flags));
93
             dispatch(updateFlags(this.props.flags));
96
 
94
 
97
             // Check if serverURL is configured externally and not allowed to change.
95
             // Check if serverURL is configured externally and not allowed to change.

+ 0
- 1
react/features/app/reducers.any.js Bestand weergeven

5
 import '../av-moderation/reducer';
5
 import '../av-moderation/reducer';
6
 import '../base/app/reducer';
6
 import '../base/app/reducer';
7
 import '../base/audio-only/reducer';
7
 import '../base/audio-only/reducer';
8
-import '../base/color-scheme/reducer';
9
 import '../base/conference/reducer';
8
 import '../base/conference/reducer';
10
 import '../base/config/reducer';
9
 import '../base/config/reducer';
11
 import '../base/connection/reducer';
10
 import '../base/connection/reducer';

+ 2
- 3
react/features/base/color-scheme/ColorSchemeRegistry.js Bestand weergeven

23
     _styleTemplates = new Map();
23
     _styleTemplates = new Map();
24
 
24
 
25
     /**
25
     /**
26
-     * Clears the already scheme-ified style definitions. This is useful when
27
-     * the {@code SET_COLOR_SCHEME} action is dispatched (again).
26
+     * Clears the already scheme-ified style definitions.
28
      *
27
      *
29
      * @returns {void}
28
      * @returns {void}
30
      */
29
      */
150
             stateful: Object | Function,
149
             stateful: Object | Function,
151
             componentName: string,
150
             componentName: string,
152
             colorDefinition: string): string {
151
             colorDefinition: string): string {
153
-        const colorScheme = toState(stateful)['features/base/color-scheme'];
152
+        const colorScheme = toState(stateful)['features/base/color-scheme'] || {};
154
 
153
 
155
         return {
154
         return {
156
             ...defaultScheme._defaultTheme,
155
             ...defaultScheme._defaultTheme,

+ 0
- 11
react/features/base/color-scheme/actionTypes.js Bestand weergeven

1
-// @flow
2
-
3
-/**
4
- * Redux action to signal a color scheme change in the app/sdk.
5
- *
6
- * {
7
- *     type: SET_COLOR_SCHEME
8
- *     colorScheme: Object
9
- * }
10
- */
11
-export const SET_COLOR_SCHEME = 'SET_COLOR_SCHEME';

+ 0
- 19
react/features/base/color-scheme/actions.js Bestand weergeven

1
-// @flow
2
-
3
-import { SET_COLOR_SCHEME } from './actionTypes';
4
-
5
-/**
6
- * Dispatches a Redux action to set the color scheme of the app/sdk.
7
- *
8
- * @param {Object} colorScheme - The color scheme to set.
9
- * @returns {{
10
- *     type: SET_COLOR_SCHEME,
11
- *     colorScheme: Object
12
- * }}
13
- */
14
-export function setColorScheme(colorScheme: Object): Object {
15
-    return {
16
-        type: SET_COLOR_SCHEME,
17
-        colorScheme
18
-    };
19
-}

+ 0
- 2
react/features/base/color-scheme/index.js Bestand weergeven

1
 // @flow
1
 // @flow
2
 
2
 
3
-export * from './actions';
4
-export * from './actionTypes';
5
 export * from './functions';
3
 export * from './functions';
6
 export { default as ColorSchemeRegistry } from './ColorSchemeRegistry';
4
 export { default as ColorSchemeRegistry } from './ColorSchemeRegistry';

+ 0
- 20
react/features/base/color-scheme/middleware.js Bestand weergeven

1
-// @flow
2
-
3
-import { MiddlewareRegistry } from '../redux';
4
-
5
-import ColorSchemeRegistry from './ColorSchemeRegistry';
6
-import { SET_COLOR_SCHEME } from './actionTypes';
7
-
8
-/**
9
- * The middleware of the feature {@code base/color-scheme}.
10
- *
11
- * @returns {Function}
12
- */
13
-MiddlewareRegistry.register((/* store */) => next => action => {
14
-    switch (action.type) {
15
-    case SET_COLOR_SCHEME:
16
-        return ColorSchemeRegistry.clear();
17
-    }
18
-
19
-    return next(action);
20
-});

+ 0
- 21
react/features/base/color-scheme/reducer.js Bestand weergeven

1
-// @flow
2
-
3
-import _ from 'lodash';
4
-
5
-import { ReducerRegistry } from '../redux';
6
-
7
-import { SET_COLOR_SCHEME } from './actionTypes';
8
-
9
-/**
10
- * The reducer of the feature {@code base/color-scheme}.
11
- *
12
- * @returns {Function}
13
- */
14
-ReducerRegistry.register('features/base/color-scheme', (state = {}, action) => {
15
-    switch (action.type) {
16
-    case SET_COLOR_SCHEME:
17
-        return _.cloneDeep(action.colorScheme) || state;
18
-    }
19
-
20
-    return state;
21
-});

Laden…
Annuleren
Opslaan