Use context parameter for the parentNode

This commit is contained in:
Benoit Marty 2025-10-30 13:02:20 +01:00 committed by Benoit Marty
parent 02dc71c4c3
commit f174084942
138 changed files with 450 additions and 375 deletions

View file

@ -16,7 +16,8 @@ import io.element.android.libraries.architecture.createNode
@ContributesBinding(AppScope::class)
class DefaultCreatePollEntryPoint : CreatePollEntryPoint {
override fun createNode(parentNode: Node, buildContext: BuildContext, params: CreatePollEntryPoint.Params): Node {
context(parentNode: Node)
override fun createNode(buildContext: BuildContext, params: CreatePollEntryPoint.Params): Node {
return parentNode.createNode<CreatePollNode>(
buildContext = buildContext,
plugins = listOf(CreatePollNode.Inputs(timelineMode = params.timelineMode, mode = params.mode))

View file

@ -16,7 +16,8 @@ import io.element.android.libraries.architecture.createNode
@ContributesBinding(AppScope::class)
class DefaultPollHistoryEntryPoint : PollHistoryEntryPoint {
override fun createNode(parentNode: Node, buildContext: BuildContext): Node {
context(parentNode: Node)
override fun createNode(buildContext: BuildContext): Node {
return parentNode.createNode<PollHistoryFlowNode>(buildContext)
}
}

View file

@ -54,7 +54,6 @@ class PollHistoryFlowNode(
return when (navTarget) {
is NavTarget.EditPoll -> {
createPollEntryPoint.createNode(
parentNode = this,
buildContext = buildContext,
params = CreatePollEntryPoint.Params(
timelineMode = Timeline.Mode.Live,