mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Use context parameter for the parentNode
This commit is contained in:
committed by
Benoit Marty
parent
02dc71c4c3
commit
f174084942
+2
-1
@@ -16,7 +16,8 @@ import io.element.android.libraries.architecture.createNode
|
||||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultCreatePollEntryPoint : CreatePollEntryPoint {
|
||||
override fun createNode(parentNode: Node, buildContext: BuildContext, params: CreatePollEntryPoint.Params): Node {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(buildContext: BuildContext, params: CreatePollEntryPoint.Params): Node {
|
||||
return parentNode.createNode<CreatePollNode>(
|
||||
buildContext = buildContext,
|
||||
plugins = listOf(CreatePollNode.Inputs(timelineMode = params.timelineMode, mode = params.mode))
|
||||
|
||||
+2
-1
@@ -16,7 +16,8 @@ import io.element.android.libraries.architecture.createNode
|
||||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultPollHistoryEntryPoint : PollHistoryEntryPoint {
|
||||
override fun createNode(parentNode: Node, buildContext: BuildContext): Node {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(buildContext: BuildContext): Node {
|
||||
return parentNode.createNode<PollHistoryFlowNode>(buildContext)
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -54,7 +54,6 @@ 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