@posthog/react-native-plugin 2.12.8 → 2.13.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.
@@ -91,7 +91,7 @@ dependencies {
91
91
  //noinspection GradleDynamicVersion
92
92
  implementation "com.facebook.react:react-native:+"
93
93
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
94
- implementation "com.posthog:posthog-android:3.72.9"
94
+ implementation "com.posthog:posthog-android:3.74.2"
95
95
 
96
96
  testImplementation "junit:junit:4.13.2"
97
97
  testImplementation "org.json:json:20250517"
@@ -906,10 +906,10 @@ internal fun applyScreenshotConfig(
906
906
  map: ReadableMap?,
907
907
  config: PostHogSessionReplayConfig,
908
908
  ) {
909
- getDoubleOrNull(map, "screenshotScale")?.let { scale ->
910
- // Keep finite values within Float range; the native setter clamps to its supported range.
909
+ getDoubleOrNull(map, "screenshotScale")?.takeIf { it.isFinite() }?.let { scale ->
910
+ // Keep values within Float range; the native setter clamps to its supported range.
911
911
  val floatMax = Float.MAX_VALUE.toDouble()
912
- config.screenshotScale = if (scale.isFinite()) scale.coerceIn(-floatMax, floatMax).toFloat() else 1f
912
+ config.screenshotScale = scale.coerceIn(-floatMax, floatMax).toFloat()
913
913
  }
914
914
  getDoubleOrNull(map, "screenshotCompressionQuality")?.takeIf { it.isFinite() }?.let { quality ->
915
915
  config.screenshotCompressionQuality = quality.toInt()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/react-native-plugin",
3
- "version": "2.12.8",
3
+ "version": "2.13.0",
4
4
  "description": "PostHog React Native plugin for iOS and Android integrations",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",