PostHog / posthog-ios

PostHog iOS SDK
https://posthog.com/docs/libraries/ios
MIT License
32 stars 41 forks source link

Make enabled property public (readonly). #22

Closed pixlwave closed 2 years ago

pixlwave commented 2 years ago

What does this PR do? Currently you can call enable or disable on PHGPostHog but there is no way to inspect whether the client is actually enabled or not. Rather than requiring library users to keep track of this themselves, this makes the enabled property public (but read only) so it is easy to inspect.

Edit: I do wonder if it might be worth renaming the getter on this property to isEnabled is it's more obviously distinct from the enable method, happy to do so if you think this would be worthwhile.

Where should the reviewer start? There's only 1 line changed :)

How should this be manually tested? Create a client and then check the value after calling enable/disable on it.

Any background context you want to provide? N/A

What are the relevant tickets? N/A

Screenshots or screencasts (if UI/UX change) N/A

Questions:

mariusandra commented 2 years ago

Thanks! 1.4.4 is out with the change!