@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.
package/android/build.gradle
CHANGED
|
@@ -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.
|
|
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"
|
package/android/src/main/java/com/posthogreactnativeplugin/PosthogReactNativePluginModule.kt
CHANGED
|
@@ -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
|
|
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 =
|
|
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()
|