@@ -14,11 +14,6 @@ import {initBackend} from 'react-devtools-shared/src/backend';
14
14
import { __DEBUG__ } from 'react-devtools-shared/src/constants' ;
15
15
import setupNativeStyleEditor from 'react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor' ;
16
16
import { getDefaultComponentFilters } from 'react-devtools-shared/src/utils' ;
17
- import {
18
- initializeUsingCachedSettings ,
19
- cacheConsolePatchSettings ,
20
- type DevToolsSettingsManager ,
21
- } from './cachedSettings' ;
22
17
23
18
import type { BackendBridge } from 'react-devtools-shared/src/bridge' ;
24
19
import type {
@@ -37,7 +32,6 @@ type ConnectOptions = {
37
32
retryConnectionDelay ?: number ,
38
33
isAppActive ?: ( ) => boolean ,
39
34
websocket ?: ?WebSocket ,
40
- devToolsSettingsManager : ?DevToolsSettingsManager ,
41
35
} ;
42
36
43
37
installHook ( window ) ;
@@ -72,7 +66,6 @@ export function connectToDevTools(options: ?ConnectOptions) {
72
66
resolveRNStyle = ( null : $FlowFixMe ) ,
73
67
retryConnectionDelay = 2000 ,
74
68
isAppActive = ( ) => true ,
75
- devToolsSettingsManager,
76
69
} = options || { } ;
77
70
78
71
const protocol = useHttps ? 'wss' : 'ws' ;
@@ -88,16 +81,6 @@ export function connectToDevTools(options: ?ConnectOptions) {
88
81
}
89
82
}
90
83
91
- if ( devToolsSettingsManager != null ) {
92
- try {
93
- initializeUsingCachedSettings ( devToolsSettingsManager ) ;
94
- } catch ( e ) {
95
- // If we call a method on devToolsSettingsManager that throws, or if
96
- // is invalid data read out, don't throw and don't interrupt initialization
97
- console . error ( e ) ;
98
- }
99
- }
100
-
101
84
if ( ! isAppActive ( ) ) {
102
85
// If the app is in background, maybe retry later.
103
86
// Don't actually attempt to connect until we're in foreground.
@@ -161,15 +144,6 @@ export function connectToDevTools(options: ?ConnectOptions) {
161
144
} ,
162
145
) ;
163
146
164
- if ( devToolsSettingsManager != null && bridge != null ) {
165
- bridge . addListener ( 'updateHookSettings' , consolePatchSettings =>
166
- cacheConsolePatchSettings (
167
- devToolsSettingsManager ,
168
- consolePatchSettings ,
169
- ) ,
170
- ) ;
171
- }
172
-
173
147
// The renderer interface doesn't read saved component filters directly,
174
148
// because they are generally stored in localStorage within the context of the extension.
175
149
// Because of this it relies on the extension to pass filters.
@@ -314,7 +288,6 @@ type ConnectWithCustomMessagingOptions = {
314
288
onSubscribe : ( cb : Function ) = > void ,
315
289
onUnsubscribe : ( cb : Function ) = > void ,
316
290
onMessage : ( event : string , payload : any ) = > void ,
317
- settingsManager : ?DevToolsSettingsManager ,
318
291
nativeStyleEditorValidAttributes ?: $ReadOnlyArray < string > ,
319
292
resolveRNStyle ?: ResolveNativeStyle ,
320
293
} ;
@@ -323,7 +296,6 @@ export function connectWithCustomMessagingProtocol({
323
296
onSubscribe,
324
297
onUnsubscribe,
325
298
onMessage,
326
- settingsManager,
327
299
nativeStyleEditorValidAttributes,
328
300
resolveRNStyle,
329
301
} : ConnectWithCustomMessagingOptions ) : Function {
@@ -332,16 +304,6 @@ export function connectWithCustomMessagingProtocol({
332
304
return ;
333
305
}
334
306
335
- if ( settingsManager != null ) {
336
- try {
337
- initializeUsingCachedSettings ( settingsManager ) ;
338
- } catch ( e ) {
339
- // If we call a method on devToolsSettingsManager that throws, or if
340
- // is invalid data read out, don't throw and don't interrupt initialization
341
- console . error ( e ) ;
342
- }
343
- }
344
-
345
307
const wall : Wall = {
346
308
listen ( fn : Function ) {
347
309
onSubscribe ( fn ) ;
@@ -367,12 +329,6 @@ export function connectWithCustomMessagingProtocol({
367
329
} ,
368
330
) ;
369
331
370
- if ( settingsManager != null ) {
371
- bridge . addListener ( 'updateHookSettings' , consolePatchSettings =>
372
- cacheConsolePatchSettings ( settingsManager , consolePatchSettings ) ,
373
- ) ;
374
- }
375
-
376
332
if ( window . __REACT_DEVTOOLS_COMPONENT_FILTERS__ == null ) {
377
333
bridge . send ( 'overrideComponentFilters' , savedComponentFilters ) ;
378
334
}
0 commit comments