TimelineItemPresenterFactories (#1609)
DI infrastructure to allow injection of presenters into the timeline. Add an `@AssistedFactory` of type `TimelineItemPresenterFactory` to a `Presenter` class and bind this factory into the TimelineItemPresenterFactory map multi binding using: ``` @Binds @IntoMap @TimelineItemEventContentKey(MyTimelineItemContent::class) ``` A map multibinding of such factories will be available in the `LocalTimelineItemPresenterFactories` composition local for further use down the UI tree.
This commit is contained in:
parent
33f5c8efb8
commit
a814c4a95a
5 changed files with 160 additions and 13 deletions
|
|
@ -219,7 +219,7 @@ Compose:
|
|||
CompositionLocalAllowlist:
|
||||
active: true
|
||||
# You can optionally define a list of CompositionLocals that are allowed here
|
||||
allowedCompositionLocals: LocalCompoundColors, LocalSnackbarDispatcher, LocalCameraPositionState
|
||||
allowedCompositionLocals: LocalCompoundColors, LocalSnackbarDispatcher, LocalCameraPositionState, LocalTimelineItemPresenterFactories
|
||||
CompositionLocalNaming:
|
||||
active: true
|
||||
ContentEmitterReturningValues:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue