-
Notifications
You must be signed in to change notification settings - Fork 498
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
Bump posthog version to 3.25 #7793
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #7793 +/- ##
===========================================
+ Coverage 12.27% 12.33% +0.06%
===========================================
Files 1651 1651
Lines 164171 163960 -211
Branches 67502 67314 -188
===========================================
+ Hits 20148 20232 +84
+ Misses 143350 143091 -259
+ Partials 673 637 -36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
/// Any user properties to be included with the next captured event. | ||
private(set) var pendingUserProperties: AnalyticsEvent.UserProperties? | ||
|
||
static let shared = PostHogAnalyticsClient() | ||
|
||
var isRunning: Bool { postHog?.enabled ?? false } | ||
var isRunning: Bool { postHog != nil } |
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.
you can use the isOptOut
method
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.
Not sure if lot better? would be a not isOptOut() and as it's optional could be a bit harder to read.
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.
postHog
can be not nil and is still internally disabled, so isOptOut
is the method to call.
!isOptOut()
== enabled
isOptOut()
== disabled.
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.
Updated, let me know if ok for you
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.
LGTM, nice simplification here :)
564762a
to
e1b9bbb
Compare
Quality Gate passedIssues Measures |
Fixes https://github.com/element-hq/crypto-internal/issues/314
Updated posthog library to 3.2.5 in order to benefit from per session grouping.
I had to move out Posthog from cocoapod and use swiftPM instead, was getting an error on posthog via cocoapod see here
There are some changes with the new Posthog SDK, main one is around setting userProperties that has dedicated API now (no need to manually put the
$set
), updated the test.There are some things I am not sure should be commited, like the
Package.resolved
change onswift-collections
or theCOCOAPODS
version change in the lock file. Let me know how to handle that.Pull Request Checklist