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/web-capture-user-across-reset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"posthog_flutter": patch
---

Keep events in call order on every platform except Windows and Linux while an async `beforeSend` runs. A `reset()`, `identify()`, `alias()`, `register()`, `group()`, `optIn()` or `optOut()` made after an un-awaited `capture()`, `screen()` or `captureException()` now applies after that event, so the event goes out with the user, super properties, groups and consent it was captured under, as in the native SDKs. While a `beforeSend` callback runs, later PostHog calls (getters included) wait for it; one that runs longer than 10 seconds stops holding them back, and its event is still sent when it finishes, with the user, super properties, groups and consent current by then.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ internal class PosthogFlutterPluginTest {
)

val replay = assertNotNull(plugin.lastBuiltConfig).sessionReplayConfig
assertEquals(1f, replay.screenshotScale)
assertNull(replay.screenshotScale)
assertEquals(30, replay.screenshotCompressionQuality)
assertEquals(PostHogScreenshotColorMode.ARGB_8888, replay.screenshotColorMode)
} finally {
Expand Down
Loading
Loading