Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: recording for flutter does not capture screenshots on both sides #208

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this is a computed property by design?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be refactored but a string match should not be an issue for now


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
Loading