Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Sep 13, 2024
1 parent ca4d25d commit d1d8d2b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions posthog-android/api/posthog-android.api
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class com/posthog/android/PostHogAndroidConfig : com/posthog/PostHogConfi
public final fun getCaptureDeepLinks ()Z
public final fun getCaptureScreenViews ()Z
public final fun getSessionReplayConfig ()Lcom/posthog/android/replay/PostHogSessionReplayConfig;
public final fun getSessionReplayMode ()Lcom/posthog/internal/replay/PostHogSessionReplayMode;
public final fun setCaptureApplicationLifecycleEvents (Z)V
public final fun setCaptureDeepLinks (Z)V
public final fun setCaptureScreenViews (Z)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public open class PostHogAndroidConfig
@PostHogExperimental
public var sessionReplayConfig: PostHogSessionReplayConfig = PostHogSessionReplayConfig(),
) : PostHogConfig(apiKey, host) {

@PostHogInternal
public fun getSessionReplayMode(): PostHogSessionReplayMode {
return if (sessionReplayConfig.screenshot) PostHogSessionReplayMode.SCREENSHOT else PostHogSessionReplayMode.WIREFRAME
Expand Down
11 changes: 10 additions & 1 deletion posthog/api/posthog.api
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ public final class com/posthog/internal/PostHogUtilsKt {
public static final fun interruptSafely (Ljava/lang/Thread;)V
}

public final class com/posthog/internal/replay/PostHogSessionReplayMode : java/lang/Enum {
public static final field SCREENSHOT Lcom/posthog/internal/replay/PostHogSessionReplayMode;
public static final field WIREFRAME Lcom/posthog/internal/replay/PostHogSessionReplayMode;
public final fun getMode ()Ljava/lang/String;
public static fun valueOf (Ljava/lang/String;)Lcom/posthog/internal/replay/PostHogSessionReplayMode;
public static fun values ()[Lcom/posthog/internal/replay/PostHogSessionReplayMode;
}

public final class com/posthog/internal/replay/RRCustomEvent : com/posthog/internal/replay/RREvent {
public fun <init> (Ljava/lang/String;Ljava/lang/Object;J)V
}
Expand Down Expand Up @@ -556,7 +564,8 @@ public final class com/posthog/internal/replay/RRStyle {
}

public final class com/posthog/internal/replay/RRUtilsKt {
public static final fun capture (Ljava/util/List;)V
public static final fun capture (Ljava/util/List;Lcom/posthog/internal/replay/PostHogSessionReplayMode;)V
public static synthetic fun capture$default (Ljava/util/List;Lcom/posthog/internal/replay/PostHogSessionReplayMode;ILjava/lang/Object;)V
}

public final class com/posthog/internal/replay/RRWireframe {
Expand Down
4 changes: 2 additions & 2 deletions posthog/src/main/java/com/posthog/internal/replay/RRUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.posthog.PostHogInternal
@PostHogInternal
public enum class PostHogSessionReplayMode(public val mode: String) {
WIREFRAME("wireframe"),
SCREENSHOT("screenshot")
SCREENSHOT("screenshot"),
}

@PostHogInternal
Expand All @@ -15,7 +15,7 @@ public fun List<RREvent>.capture(mode: PostHogSessionReplayMode = PostHogSession
mutableMapOf(
"\$snapshot_data" to this,
"\$snapshot_source" to "mobile",
"\$snapshot_mode" to mode.mode
"\$snapshot_mode" to mode.mode,
)
PostHog.capture("\$snapshot", properties = properties)
}

0 comments on commit d1d8d2b

Please sign in to comment.