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 DefaultJoinRoomEntryPoint : JoinRoomEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(buildContext: BuildContext, inputs: JoinRoomEntryPoint.Inputs): Node {
|
||||
override fun createNode(
|
||||
parentNode: Node,
|
||||
buildContext: BuildContext,
|
||||
inputs: JoinRoomEntryPoint.Inputs,
|
||||
): Node {
|
||||
return parentNode.createNode<JoinRoomFlowNode>(
|
||||
buildContext = buildContext,
|
||||
plugins = listOf(inputs)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,11 @@ class JoinRoomFlowNode(
|
|||
|
||||
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
||||
return when (navTarget) {
|
||||
is NavTarget.DeclineInviteAndBlockUser -> declineAndBlockEntryPoint.createNode(buildContext, navTarget.inviteData)
|
||||
is NavTarget.DeclineInviteAndBlockUser -> declineAndBlockEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
inviteData = navTarget.inviteData,
|
||||
)
|
||||
NavTarget.Root -> rootNode(buildContext)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue