Skip to content
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

Expose converter via StoreBuilder.from() function #594

Merged

Conversation

wbrawner
Copy link
Contributor

Closes #554

Description

This just exposes the converter argument in the RealStoreBuilder class so that one can provide custom implementations of it. I'd be happy to update the docs as well, if I could be directed to where I can find the sources for them.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Test Plan

This didn't seem to warrant any new tests, but I could add them if desired.

Checklist:

Before submitting your PR, please review and check all of the following:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my change is effective
  • New and existing unit tests pass locally with my changes

RealStoreBuilder(fetcher, sourceOfTruth, memoryCache)
RealStoreBuilder<Key, Network, Output, Network>(fetcher, sourceOfTruth, memoryCache)

fun <Key : Any, Network : Any, Output : Any, Local: Any> storeBuilderFromFetcherSourceOfTruthMemoryCacheAndConverter(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the existing conventions for naming this function, but just out of curiosity: why not use a single function with default arguments?

Copy link
Collaborator

@matt-ramotar matt-ramotar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to be slow, lgtm 👍🏽

@matt-ramotar matt-ramotar merged commit c3950a1 into MobileNativeFoundation:main Jan 8, 2024
1 check passed
@wbrawner wbrawner deleted the converter-store-builder branch January 8, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add converter to StoreBuilder
2 participants