-
Notifications
You must be signed in to change notification settings - Fork 27
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: session replay and auto capture works with 'with' method #217
Conversation
// its not guaranteed that the posthog instance is set | ||
if (postHog != null) { | ||
events.capture(postHog) | ||
} else { | ||
// use static instance | ||
events.capture() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
important part is here
@@ -64,7 +64,7 @@ public final class com/posthog/android/replay/PostHogReplayIntegration : com/pos | |||
public static final field ANDROID_COMPOSE_VIEW_CLASS_NAME Ljava/lang/String; | |||
public static final field PH_NO_CAPTURE_LABEL Ljava/lang/String; | |||
public fun <init> (Landroid/content/Context;Lcom/posthog/android/PostHogAndroidConfig;Lcom/posthog/android/internal/MainHandler;)V | |||
public fun install ()V | |||
public fun install (Lcom/posthog/PostHogInterface;)V |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically a breaking change but we don't document this integration API anywhere so its ok (we only use intergrations internally)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
if (props.isNotEmpty()) { | ||
postHog?.capture("Deep Link Opened", properties = props) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fly by fix, no event should be captured if we don't know where it comes from
💡 Motivation and Context
Closes #216
💚 How did you test it?
📝 Checklist