mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Remove context(parentNode: Node) and provide the parent Node as a parameter.
This commit is contained in:
+5
-2
@@ -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))
|
||||
|
||||
+1
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user