Use context parameter for the parentNode
This commit is contained in:
parent
02dc71c4c3
commit
f174084942
138 changed files with 450 additions and 375 deletions
|
|
@ -6,7 +6,8 @@ import com.bumble.appyx.core.plugin.Plugin
|
|||
import io.element.android.libraries.architecture.FeatureEntryPoint
|
||||
|
||||
interface ${FEATURE_NAME}EntryPoint : FeatureEntryPoint {
|
||||
fun createNode(parentNode: Node, buildContext: BuildContext, callback: Callback): Node
|
||||
context(parentNode: Node)
|
||||
fun createNode(buildContext: BuildContext, callback: Callback): Node
|
||||
|
||||
interface Callback : Plugin {
|
||||
// Add your callbacks
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import dev.zacsweers.metro.AppScope
|
|||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class Default${FEATURE_NAME}EntryPoint() : ${FEATURE_NAME}EntryPoint {
|
||||
|
||||
override fun createNode(parentNode: Node, buildContext: BuildContext, callback: ${FEATURE_NAME}EntryPoint.Callback): Node {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(buildContext: BuildContext, callback: ${FEATURE_NAME}EntryPoint.Callback): Node {
|
||||
return parentNode.createNode<${FEATURE_NAME}FlowNode>(buildContext, listOf(callback))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue