Remove context(parentNode: Node) and provide the parent Node as a parameter.
This commit is contained in:
parent
f1822c5afd
commit
07b6148035
161 changed files with 668 additions and 436 deletions
|
|
@ -16,8 +16,11 @@ import io.element.android.libraries.architecture.createNode
|
|||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultCreatePollEntryPoint : CreatePollEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(buildContext: BuildContext, params: CreatePollEntryPoint.Params): Node {
|
||||
override fun createNode(
|
||||
parentNode: Node,
|
||||
buildContext: BuildContext,
|
||||
params: CreatePollEntryPoint.Params,
|
||||
): Node {
|
||||
return parentNode.createNode<CreatePollNode>(
|
||||
buildContext = buildContext,
|
||||
plugins = listOf(CreatePollNode.Inputs(timelineMode = params.timelineMode, mode = params.mode))
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ import io.element.android.libraries.architecture.createNode
|
|||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultPollHistoryEntryPoint : PollHistoryEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(buildContext: BuildContext): Node {
|
||||
override fun createNode(parentNode: Node, buildContext: BuildContext): Node {
|
||||
return parentNode.createNode<PollHistoryFlowNode>(buildContext)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ class PollHistoryFlowNode(
|
|||
return when (navTarget) {
|
||||
is NavTarget.EditPoll -> {
|
||||
createPollEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
params = CreatePollEntryPoint.Params(
|
||||
timelineMode = Timeline.Mode.Live,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue