-
Notifications
You must be signed in to change notification settings - Fork 112
Introduces ScreenViewFactory.forWrapper
#805
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
Conversation
Wrapping is finally as simple as it should be. Also moves `ScreenViewRunner` to a better home in `ScreenViewHolder.kt`.
b270d25 to
8192497
Compare
| * Environment.EMPTY + (ReverseNeutronFlowPolarity to true) | ||
| * ) | ||
| * } | ||
| * } |
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.
Awesome examples! Thank-you!
| public inline fun < | ||
| reified WrapperT : Screen, | ||
| WrappedT : Screen | ||
| > forWrapper( |
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.
This formatting looks odd to me? Can we move the generics up on the same line and the function name too?
|
Uh oh, |
| public inline fun < | ||
| reified WrapperT : Screen, | ||
| WrappedT : Screen | ||
| > ScreenViewFactory<WrappedT>.toUnwrappingViewFactory( | ||
| crossinline unwrap: (wrapperScreen: WrapperT) -> WrappedT, | ||
| ): ScreenViewFactory<WrapperT> = | ||
| toUnwrappingViewFactory(unwrap) { _, ws, e, su -> su(unwrap(ws), e) } |
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.
I already regret deleting this, probably going to bring it back.
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.
Nope, still no use case.
Wrapping is finally as simple as it should be.
Also moves
ScreenViewRunnerto a better home inScreenViewHolder.kt.