Automattic / Gravatar-SDK-iOS

Gravatar SDK is a Swift library that allows you to integrate Gravatar features into your own iOS applications.
https://gravatar.com
Mozilla Public License 2.0
41 stars 5 forks source link

Open `claimProfile(...)` from `ProfileViewConfiguration` as well #247

Closed pinarol closed 6 months ago

pinarol commented 6 months ago

Closes # Continuation of the empty profile work.

Description

I noticed that we didn't offer the claimProfile(...) config directly via ProfileViewConfiguration. In pocket-casts I use ProfileViewConfiguration so the code is unaware of the underlying view type. It would be good to offer this via ProfileViewConfiguration as well.

I am not sure if this is the best but I created a new Templates enum to separate these type of "prefilled" configurations from other static functions that create an empty profile.

So the usage will look like this:

ProfileViewConfiguration.Templates.claimProfile(profileStyle: .summary, ...)

Let me know what you think.

Testing Steps

CI green.