Use context parameter for the parentNode
This commit is contained in:
parent
566515ca88
commit
05c5f3c914
138 changed files with 450 additions and 375 deletions
|
|
@ -16,7 +16,8 @@ import io.element.android.libraries.di.SessionScope
|
|||
|
||||
@ContributesBinding(SessionScope::class)
|
||||
class DefaultMessagesEntryPoint : MessagesEntryPoint {
|
||||
override fun createNode(parentNode: Node, buildContext: BuildContext, params: MessagesEntryPoint.Params, callback: MessagesEntryPoint.Callback): Node {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(buildContext: BuildContext, params: MessagesEntryPoint.Params, callback: MessagesEntryPoint.Callback): Node {
|
||||
return parentNode.createNode<MessagesFlowNode>(buildContext, listOf(params, callback))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,7 +321,6 @@ class MessagesFlowNode(
|
|||
}
|
||||
}
|
||||
mediaViewerEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
params = params,
|
||||
callback = callback
|
||||
|
|
@ -337,7 +336,7 @@ class MessagesFlowNode(
|
|||
}
|
||||
is NavTarget.LocationViewer -> {
|
||||
val inputs = ShowLocationEntryPoint.Inputs(navTarget.location, navTarget.description)
|
||||
showLocationEntryPoint.createNode(this, buildContext, inputs)
|
||||
showLocationEntryPoint.createNode(buildContext, inputs)
|
||||
}
|
||||
is NavTarget.EventDebugInfo -> {
|
||||
val inputs = EventDebugInfoNode.Inputs(navTarget.eventId, navTarget.debugInfo)
|
||||
|
|
@ -359,7 +358,6 @@ class MessagesFlowNode(
|
|||
}
|
||||
}
|
||||
forwardEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
params = params,
|
||||
callback = callback,
|
||||
|
|
@ -371,14 +369,12 @@ class MessagesFlowNode(
|
|||
}
|
||||
is NavTarget.SendLocation -> {
|
||||
sendLocationEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
timelineMode = navTarget.timelineMode,
|
||||
)
|
||||
}
|
||||
is NavTarget.CreatePoll -> {
|
||||
createPollEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
params = CreatePollEntryPoint.Params(
|
||||
timelineMode = navTarget.timelineMode,
|
||||
|
|
@ -388,7 +384,6 @@ class MessagesFlowNode(
|
|||
}
|
||||
is NavTarget.EditPoll -> {
|
||||
createPollEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
params = CreatePollEntryPoint.Params(
|
||||
timelineMode = navTarget.timelineMode,
|
||||
|
|
@ -428,7 +423,7 @@ class MessagesFlowNode(
|
|||
createNode<PinnedMessagesListNode>(buildContext, plugins = listOf(callback))
|
||||
}
|
||||
NavTarget.KnockRequestsList -> {
|
||||
knockRequestsListEntryPoint.createNode(this, buildContext)
|
||||
knockRequestsListEntryPoint.createNode(buildContext)
|
||||
}
|
||||
is NavTarget.Thread -> {
|
||||
val inputs = ThreadedMessagesNode.Inputs(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue