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:
Marco Romano
2023-10-19 15:57:34 +02:00
committed by GitHub
parent 33f5c8efb8
commit a814c4a95a
5 changed files with 160 additions and 13 deletions
+1 -1
View File
@@ -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: