mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Remove NodeBuilder to ensure that Params and Callback are always provided.
This commit is contained in:
committed by
Benoit Marty
parent
be03c50aaf
commit
02dc71c4c3
+2
-14
@@ -11,19 +11,7 @@ import dev.zacsweers.metro.AppScope
|
||||
@ContributesBinding(AppScope::class)
|
||||
class Default${FEATURE_NAME}EntryPoint() : ${FEATURE_NAME}EntryPoint {
|
||||
|
||||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): ${FEATURE_NAME}EntryPoint.NodeBuilder {
|
||||
val plugins = ArrayList<Plugin>()
|
||||
|
||||
return object : ${FEATURE_NAME}EntryPoint.NodeBuilder {
|
||||
|
||||
override fun callback(callback: ${FEATURE_NAME}EntryPoint.Callback): ${FEATURE_NAME}EntryPoint.NodeBuilder {
|
||||
plugins += callback
|
||||
return this
|
||||
}
|
||||
|
||||
override fun build(): Node {
|
||||
return parentNode.createNode<${FEATURE_NAME}FlowNode>(buildContext, plugins)
|
||||
}
|
||||
}
|
||||
override fun createNode(parentNode: Node, buildContext: BuildContext, callback: ${FEATURE_NAME}EntryPoint.Callback): Node {
|
||||
return parentNode.createNode<${FEATURE_NAME}FlowNode>(buildContext, listOf(callback))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user