Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/quick-pigs-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'posthog-android': patch
---

Ignore `isLaidOut` checks for React Native session replay.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import com.posthog.android.replay.internal.NextDrawListener.Companion.onNextDraw
import com.posthog.android.replay.internal.ViewTreeSnapshotStatus
import com.posthog.android.replay.internal.isAlive
import com.posthog.android.replay.internal.isAliveAndAttachedToWindow
import com.posthog.internal.PostHogSessionManager
import com.posthog.internal.PostHogThreadFactory
import com.posthog.internal.replay.PostHogSessionReplayHandler
import com.posthog.internal.replay.RRCustomEvent
Expand Down Expand Up @@ -671,7 +672,7 @@ public class PostHogReplayIntegration(
private fun View.isViewStateStableForMatrixOperations(): Boolean {
return try {
isAttachedToWindow &&
isLaidOut &&
(isLaidOut || PostHogSessionManager.isReactNative) &&
// Check if view has valid dimensions
width > 0 && height > 0 &&
// Check if view is not in layout transition (API 18+)
Expand Down
Loading