plotline-engage 4.1.4 → 4.1.6

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.
@@ -39,6 +39,6 @@ repositories {
39
39
 
40
40
  dependencies {
41
41
  implementation 'com.facebook.react:react-native:+'
42
- implementation 'com.gitlab.plotline:plotline-android-sdk:3.3.4'
42
+ implementation 'com.gitlab.plotline:plotline-android-sdk:3.3.6'
43
43
  }
44
44
 
package/index.js CHANGED
@@ -186,8 +186,10 @@ const PlotlineWidget = ({ testID }) => {
186
186
  const subscription = plotlineEvents.addListener(
187
187
  'onPlotlineWidgetReady',
188
188
  (event) => {
189
- const { width, height } = event;
190
- setSize({ width, height });
189
+ const { width, height, sizeForTestID } = event;
190
+ if (sizeForTestID === testID) {
191
+ setSize({ width, height });
192
+ }
191
193
  }
192
194
  );
193
195
 
@@ -40,7 +40,7 @@
40
40
 
41
41
  - (void)onWidgetReadyWithWidth:(CGFloat)width height:(CGFloat)height {
42
42
  PlotlineWidgetEventEmitter *plotlineWidgetEventEmitter = [self.eventBridge moduleForClass:[PlotlineWidgetEventEmitter class]];
43
- [plotlineWidgetEventEmitter sendSizeEventWithWidth:width height:height];
43
+ [plotlineWidgetEventEmitter sendSizeEventWithWidth:width height:height sizeForTestID:self.testID];
44
44
  }
45
45
 
46
46
  @end
@@ -9,7 +9,7 @@
9
9
 
10
10
  @interface PlotlineWidgetEventEmitter : RCTEventEmitter
11
11
  @property (nonatomic) BOOL hasListeners;
12
- - (void)sendSizeEventWithWidth:(CGFloat)width height:(CGFloat)height;
12
+ - (void)sendSizeEventWithWidth:(CGFloat)width height:(CGFloat)height sizeForTestID:(NSString *)sizeForTestID;
13
13
  @end
14
14
 
15
15
 
@@ -15,9 +15,13 @@ RCT_EXPORT_MODULE(PlotlineWidgetEventEmitter)
15
15
  return @[@"onPlotlineWidgetReady"];
16
16
  }
17
17
 
18
- - (void)sendSizeEventWithWidth:(CGFloat)width height:(CGFloat)height {
18
+ - (void)sendSizeEventWithWidth:(CGFloat)width height:(CGFloat)height sizeForTestID:(NSString *)sizeForTestID {
19
19
  if (self.hasListeners) {
20
- [self sendEventWithName:@"onPlotlineWidgetReady" body:@{@"width": @(width), @"height": @(height)}];
20
+ [self sendEventWithName:@"onPlotlineWidgetReady" body:@{
21
+ @"width": @(width),
22
+ @"height": @(height),
23
+ @"sizeForTestID": sizeForTestID
24
+ }];
21
25
  }
22
26
  }
23
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plotline-engage",
3
- "version": "4.1.4",
3
+ "version": "4.1.6",
4
4
  "description": "React Native plugin for Plotline",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"