Skip to content

Commit

Permalink
fix: recording for flutter does not capture screenshots on both sides
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Nov 26, 2024
1 parent 00df232 commit a7b5df0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Next

- no user facing changes

## 3.9.2 - 2024-11-12

- fix: allow changing person properties after identify ([#205](https://github.com/PostHog/posthog-android/pull/205))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ public class PostHogReplayIntegration(
private val isSessionReplayEnabled: Boolean
get() = PostHog.isSessionReplayActive()

// flutter captures snapshots, so we don't need to capture them here
private val isNativeSdk: Boolean
get() = (config.sdkName != "posthog-flutter")

private fun addView(
view: View,
added: Boolean = true,
Expand All @@ -144,7 +148,7 @@ public class PostHogReplayIntegration(
config.dateProvider,
config.sessionReplayConfig.debouncerDelayMs,
) {
if (!isSessionReplayEnabled) {
if (!isSessionReplayEnabled || !isNativeSdk) {
return@onNextDraw
}
val timestamp = config.dateProvider.currentTimeMillis()
Expand Down

0 comments on commit a7b5df0

Please sign in to comment.