-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add color customization support #17
Conversation
1600653
to
e870e68
Compare
e870e68
to
a98dc8f
Compare
838bdbb
to
d5c763a
Compare
d5c763a
to
992152a
Compare
6a65bf9
to
34779a6
Compare
...pify-checkout-kit/android/src/main/java/com/shopifycheckoutkit/ShopifyCheckoutKitModule.java
Outdated
Show resolved
Hide resolved
...pify-checkout-kit/android/src/main/java/com/shopifycheckoutkit/ShopifyCheckoutKitModule.java
Show resolved
Hide resolved
@ReactMethod | ||
public void configure(ReadableMap config) { | ||
Context context = getReactApplicationContext(); | ||
|
||
ShopifyCheckoutKit.configure(configuration -> { | ||
if (config.hasKey("preloading")) { |
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.
If you create a type for the config (eg a record class might do), all these map checks would go away and clean up the code. You could do all the config validation in this function
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.
Is it possible to use an external lib like jackson? I think you could convert a map direct to a POJO. I reckon it might clean up the code a bit.
@cianbuckley and I paired on this to improve the java codebase, but we decided to handle it in a follow up to avoid blocking progress here |
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
What are you trying to accomplish?
Example configuration for
light
,dark
andweb
options:Example config for
automatic
: