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,8 +16,8 @@ import io.element.android.libraries.architecture.createNode
|
|||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultPreferencesEntryPoint : PreferencesEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(
|
||||
parentNode: Node,
|
||||
buildContext: BuildContext,
|
||||
params: PreferencesEntryPoint.Params,
|
||||
callback: PreferencesEntryPoint.Callback,
|
||||
|
|
|
|||
|
|
@ -216,7 +216,6 @@ class PreferencesFlowNode(
|
|||
}
|
||||
NavTarget.TroubleshootNotifications -> {
|
||||
notificationTroubleShootEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
callback = object : NotificationTroubleShootEntryPoint.Callback {
|
||||
override fun onDone() {
|
||||
|
|
@ -235,9 +234,8 @@ class PreferencesFlowNode(
|
|||
}
|
||||
NavTarget.PushHistory -> {
|
||||
pushHistoryEntryPoint.createNode(
|
||||
this,
|
||||
buildContext,
|
||||
object : PushHistoryEntryPoint.Callback {
|
||||
buildContext = buildContext,
|
||||
callback = object : PushHistoryEntryPoint.Callback {
|
||||
override fun onDone() {
|
||||
if (backstack.canPop()) {
|
||||
backstack.pop()
|
||||
|
|
@ -270,7 +268,6 @@ class PreferencesFlowNode(
|
|||
}
|
||||
NavTarget.LockScreenSettings -> {
|
||||
lockScreenEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
navTarget = LockScreenEntryPoint.Target.Settings,
|
||||
callback = object : LockScreenEntryPoint.Callback {
|
||||
|
|
@ -290,16 +287,15 @@ class PreferencesFlowNode(
|
|||
}
|
||||
}
|
||||
logoutEntryPoint.createNode(
|
||||
parentNode = this,
|
||||
buildContext = buildContext,
|
||||
callback = callBack,
|
||||
)
|
||||
}
|
||||
is NavTarget.OssLicenses -> {
|
||||
openSourceLicensesEntryPoint.createNode(this, buildContext)
|
||||
openSourceLicensesEntryPoint.createNode(buildContext)
|
||||
}
|
||||
NavTarget.AccountDeactivation -> {
|
||||
accountDeactivationEntryPoint.createNode(this, buildContext)
|
||||
accountDeactivationEntryPoint.createNode(buildContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue