@regulaforensics/react-native-document-reader-api 7.4.683-nightly → 7.4.684-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  "test": "jest"
11
11
  },
12
12
  "dependencies": {
13
- "@regulaforensics/react-native-document-reader-api": "7.4.683-nightly",
13
+ "@regulaforensics/react-native-document-reader-api": "7.4.684-nightly",
14
14
  "@regulaforensics/react-native-document-reader-core-fullauthrfid": "7.4.621-nightly",
15
15
  "react-native-progress": "5.0.0",
16
16
  "react-native-radio-buttons-group": "3.0.5",
@@ -23,9 +23,13 @@ RCT_EXPORT_MODULE();
23
23
  RGLWOnCustomButtonTappedEvent];
24
24
  }
25
25
 
26
+ static bool hasListeners;
27
+ -(void)startObserving { hasListeners = YES; }
28
+ -(void)stopObserving { hasListeners = NO; }
29
+
26
30
  static RGLWEventSender sendEvent = ^(NSString* event, id data) {
27
31
  dispatch_async(dispatch_get_main_queue(), ^{
28
- [RGLWPlugin sendEventWithName:event body:@{@"msg": data}];
32
+ if (hasListeners) [RGLWPlugin sendEventWithName:event body:@{@"msg": data}];
29
33
  });
30
34
  };
31
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/react-native-document-reader-api",
3
- "version": "7.4.683-nightly",
3
+ "version": "7.4.684-nightly",
4
4
  "description": "React Native module for reading and validation of identification documents (API framework)",
5
5
  "main": "index.js",
6
6
  "scripts": {