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,7 @@ import io.element.android.libraries.architecture.createNode
|
|||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultAnalyticsEntryPoint : AnalyticsEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(buildContext: BuildContext): Node {
|
||||
override fun createNode(parentNode: Node, buildContext: BuildContext): Node {
|
||||
return parentNode.createNode<AnalyticsOptInNode>(buildContext)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@ class DefaultAnalyticsEntryPointTest {
|
|||
)
|
||||
)
|
||||
}
|
||||
val result = with(parentNode) {
|
||||
entryPoint.createNode(BuildContext.root(null))
|
||||
}
|
||||
val result = entryPoint.createNode(parentNode, BuildContext.root(null))
|
||||
assertThat(result).isInstanceOf(AnalyticsOptInNode::class.java)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue