@iternio/react-native-auto-play 0.1.14 → 0.1.16

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.
@@ -90,9 +90,14 @@ class VirtualRenderer(
90
90
  reactContext, UIManagerType.FABRIC
91
91
  ) as FabricUIManager
92
92
  } else {
93
- uiManager = UIManagerHelper.getUIManager(
94
- reactContext, UIManagerType.LEGACY
95
- ) as UIManager
93
+ // UIManagerType.DEFAULT was deprecated and will eventually be removed, but LEGACY is not available in lower RN versions.
94
+ // So make sure both work to be backwards compatible
95
+ val legacyType = try {
96
+ UIManagerType::class.java.getField("LEGACY").getInt(null)
97
+ } catch (e: NoSuchFieldException) {
98
+ UIManagerType.DEFAULT
99
+ }
100
+ uiManager = UIManagerHelper.getUIManager(reactContext, legacyType) as UIManager
96
101
  }
97
102
 
98
103
  initRenderer()
@@ -511,4 +516,4 @@ class VirtualRenderer(
511
516
  virtualRenderer.remove(moduleId)
512
517
  }
513
518
  }
514
- }
519
+ }
@@ -654,9 +654,13 @@ object Parser {
654
654
  setRoundaboutExitNumber(it.toInt())
655
655
  }
656
656
  nitroManeuver.angle?.let { roundaboutExitAngle ->
657
- val angle =
658
- ((180 - roundaboutExitAngle) % 360).toInt().let { if (it == 0) 360 else it }
659
- setRoundaboutExitAngle(angle)
657
+ if (nitroManeuver.trafficSide == TrafficSide.LEFT) {
658
+ val angle = ((180 + roundaboutExitAngle) % 360).toInt().let { if (it == 0) 360 else it }
659
+ setRoundaboutExitAngle(angle)
660
+ } else {
661
+ val angle = ((180 - roundaboutExitAngle) % 360).toInt().let { if (it == 0) 360 else it }
662
+ setRoundaboutExitAngle(angle)
663
+ }
660
664
  }
661
665
  }
662
666
  }.build()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iternio/react-native-auto-play",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "Android Auto and Apple CarPlay for react-native",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",