Bläddra i källkod

fix(rn,sdk) remove deprecated color scheme prop

It has been non-functional for a while.
master
Saúl Ibarra Corretgé 3 år sedan
förälder
incheckning
f6f7406d24

+ 0
- 30
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetConferenceOptions.java Visa fil

@@ -45,11 +45,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
45 45
      */
46 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 49
      * Config. See: https://github.com/jitsi/jitsi-meet/blob/master/config.js
55 50
      */
@@ -77,10 +72,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
77 72
         return token;
78 73
     }
79 74
 
80
-    public Bundle getColorScheme() {
81
-        return colorScheme;
82
-    }
83
-
84 75
     public Bundle getFeatureFlags() {
85 76
         return featureFlags;
86 77
     }
@@ -97,7 +88,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
97 88
         private String room;
98 89
         private String token;
99 90
 
100
-        private Bundle colorScheme;
101 91
         private Bundle config;
102 92
         private Bundle featureFlags;
103 93
 
@@ -152,19 +142,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
152 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 146
          * Indicates the conference will be joined with the microphone muted.
170 147
          * @param audioMuted - Muted indication.
@@ -276,7 +253,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
276 253
             options.serverURL = this.serverURL;
277 254
             options.room = this.room;
278 255
             options.token = this.token;
279
-            options.colorScheme = this.colorScheme;
280 256
             options.config = this.config;
281 257
             options.featureFlags = this.featureFlags;
282 258
             options.userInfo = this.userInfo;
@@ -292,7 +268,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
292 268
         serverURL = (URL) in.readSerializable();
293 269
         room = in.readString();
294 270
         token = in.readString();
295
-        colorScheme = in.readBundle();
296 271
         config = in.readBundle();
297 272
         featureFlags = in.readBundle();
298 273
         userInfo = new JitsiMeetUserInfo(in.readBundle());
@@ -308,10 +283,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
308 283
 
309 284
         props.putBundle("flags", featureFlags);
310 285
 
311
-        if (colorScheme != null) {
312
-            props.putBundle("colorScheme", colorScheme);
313
-        }
314
-
315 286
         Bundle urlProps = new Bundle();
316 287
 
317 288
         // The room is fully qualified
@@ -360,7 +331,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
360 331
         dest.writeSerializable(serverURL);
361 332
         dest.writeString(room);
362 333
         dest.writeString(token);
363
-        dest.writeBundle(colorScheme);
364 334
         dest.writeBundle(config);
365 335
         dest.writeBundle(featureFlags);
366 336
         dest.writeBundle(userInfo != null ? userInfo.asBundle() : new Bundle());

+ 0
- 7
ios/sdk/src/JitsiMeetConferenceOptions.h Visa fil

@@ -34,12 +34,6 @@
34 34
  */
35 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 38
  * Feature flags. See: https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.js
45 39
  */
@@ -82,7 +76,6 @@
82 76
 @property (nonatomic, copy, nullable, readonly) NSString *room;
83 77
 @property (nonatomic, copy, nullable, readonly) NSString *token;
84 78
 
85
-@property (nonatomic, copy, nullable) NSDictionary *colorScheme;
86 79
 @property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
87 80
 
88 81
 @property (nonatomic, readonly) BOOL welcomePageEnabled;

+ 0
- 7
ios/sdk/src/JitsiMeetConferenceOptions.m Visa fil

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

+ 0
- 2
react/features/app/components/App.native.js Visa fil

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

+ 0
- 1
react/features/app/reducers.any.js Visa fil

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

+ 2
- 3
react/features/base/color-scheme/ColorSchemeRegistry.js Visa fil

@@ -23,8 +23,7 @@ class ColorSchemeRegistry {
23 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 28
      * @returns {void}
30 29
      */
@@ -150,7 +149,7 @@ class ColorSchemeRegistry {
150 149
             stateful: Object | Function,
151 150
             componentName: string,
152 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 154
         return {
156 155
             ...defaultScheme._defaultTheme,

+ 0
- 11
react/features/base/color-scheme/actionTypes.js Visa fil

@@ -1,11 +0,0 @@
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 Visa fil

@@ -1,19 +0,0 @@
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 Visa fil

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

+ 0
- 20
react/features/base/color-scheme/middleware.js Visa fil

@@ -1,20 +0,0 @@
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 Visa fil

@@ -1,21 +0,0 @@
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
-});

Laddar…
Avbryt
Spara