@@ -53,25 +53,25 @@ + (BOOL)requiresMainQueueSetup
5353}
5454RCT_EXPORT_MODULE (IBGNetworkLogger)
5555
56- bool hasListeners = NO;
56+ bool ibg_hasListeners = NO;
5757
5858
5959
6060// Will be called when this module's first listener is added.
6161-(void )startObserving {
62- hasListeners = YES ;
62+ ibg_hasListeners = YES ;
6363 // Set up any upstream listeners or background tasks as necessary
6464}
6565
6666// Will be called when this module's last listener is removed, or on dealloc.
6767-(void )stopObserving {
68- hasListeners = NO ;
68+ ibg_hasListeners = NO ;
6969 // Remove upstream listeners, stop unnecessary background tasks
7070}
7171
7272RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD (isNativeInterceptionEnabled) {
7373 return @(IBGNetworkLogger.isNativeNetworkInterceptionFeatureEnabled );
74- }
74+ }
7575
7676
7777
@@ -114,7 +114,7 @@ -(void)stopObserving {
114114
115115 // Initialize the NSMutableURLRequest
116116 NSMutableURLRequest *request = [[NSMutableURLRequest alloc ] initWithURL: requestURL];
117-
117+
118118 // Set the HTTP body if provided
119119 if (requestBody && [requestBody isKindOfClass: [NSString class ]]) {
120120 request.HTTPBody = [requestBody dataUsingEncoding: NSUTF8StringEncoding];
@@ -157,7 +157,7 @@ - (void)setupRequestFilteringHandler {
157157 self.requestFilteringCompletionDictionary [callbackID] = completion;
158158
159159 NSDictionary *dict = [self createNetworkRequestDictForRequest: request callbackID: callbackID];
160- if (hasListeners ){
160+ if (ibg_hasListeners ){
161161 [self sendEventWithName: @" IBGNetworkLoggerHandler" body: dict];
162162 }
163163
@@ -172,7 +172,7 @@ - (void)setupRequestObfuscationHandler {
172172
173173
174174 NSDictionary *dict = [self createNetworkRequestDictForRequest: request callbackID: callbackID];
175- if (hasListeners ) {
175+ if (ibg_hasListeners ) {
176176 [self sendEventWithName: @" IBGNetworkLoggerHandler" body: dict];
177177 }
178178
0 commit comments