@pinwheel/react-native-pinwheel 3.2.0-rc.6 → 3.2.0

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.
@@ -14,6 +14,7 @@ import com.facebook.react.bridge.ReactApplicationContext
14
14
  import com.underdog_tech.pinwheel_android.PinwheelEventListener
15
15
  import com.underdog_tech.pinwheel_android.PinwheelFragment
16
16
  import com.facebook.react.uimanager.ThemedReactContext
17
+ import com.facebook.react.modules.systeminfo.ReactNativeVersion
17
18
 
18
19
  class Pinwheel : FrameLayout {
19
20
  private var token: String? = null
@@ -45,10 +46,15 @@ class Pinwheel : FrameLayout {
45
46
  this.token = token
46
47
  }
47
48
 
49
+ fun getReactNativeVersion(): String {
50
+ val version = ReactNativeVersion.VERSION
51
+ return "${version["major"]}.${version["minor"]}.${version["patch"]}"
52
+ }
53
+
48
54
  private fun createFragment() {
49
55
  Handler(Looper.getMainLooper()).post {
50
56
  this.token?.let {
51
- val pinwheelFragment = PinwheelFragment.newInstance(it, "react native", "3.2.0")
57
+ val pinwheelFragment = PinwheelFragment.newInstance(it, "react native", "3.2.0", getReactNativeVersion())
52
58
  pinwheelEventListener?.let { listener ->
53
59
  pinwheelFragment.pinwheelEventListener = listener
54
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinwheel/react-native-pinwheel",
3
- "version": "3.2.0-rc.6",
3
+ "version": "3.2.0",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",