Small rework for code clarity.
Actually hide the attachment of LoggedInAppScopeFlowNode.
This commit is contained in:
parent
b156097e1a
commit
a6404a9b47
1 changed files with 3 additions and 4 deletions
|
|
@ -288,7 +288,6 @@ class RootFlowNode @AssistedInject constructor(
|
||||||
private suspend fun navigateTo(permalinkData: PermalinkData) {
|
private suspend fun navigateTo(permalinkData: PermalinkData) {
|
||||||
Timber.d("Navigating to $permalinkData")
|
Timber.d("Navigating to $permalinkData")
|
||||||
attachSession(null)
|
attachSession(null)
|
||||||
.attachSession()
|
|
||||||
.apply {
|
.apply {
|
||||||
when (permalinkData) {
|
when (permalinkData) {
|
||||||
is PermalinkData.FallbackLink -> Unit
|
is PermalinkData.FallbackLink -> Unit
|
||||||
|
|
@ -309,7 +308,6 @@ class RootFlowNode @AssistedInject constructor(
|
||||||
private suspend fun navigateTo(deeplinkData: DeeplinkData) {
|
private suspend fun navigateTo(deeplinkData: DeeplinkData) {
|
||||||
Timber.d("Navigating to $deeplinkData")
|
Timber.d("Navigating to $deeplinkData")
|
||||||
attachSession(deeplinkData.sessionId)
|
attachSession(deeplinkData.sessionId)
|
||||||
.attachSession()
|
|
||||||
.apply {
|
.apply {
|
||||||
when (deeplinkData) {
|
when (deeplinkData) {
|
||||||
is DeeplinkData.Root -> Unit // The room list will always be shown, observing FtueState
|
is DeeplinkData.Root -> Unit // The room list will always be shown, observing FtueState
|
||||||
|
|
@ -323,10 +321,11 @@ class RootFlowNode @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
// [sessionId] will be null for permalink.
|
// [sessionId] will be null for permalink.
|
||||||
private suspend fun attachSession(sessionId: SessionId?): LoggedInAppScopeFlowNode {
|
private suspend fun attachSession(sessionId: SessionId?): LoggedInFlowNode {
|
||||||
// TODO handle multi-session
|
// TODO handle multi-session
|
||||||
return waitForChildAttached { navTarget ->
|
return waitForChildAttached<LoggedInAppScopeFlowNode, NavTarget> { navTarget ->
|
||||||
navTarget is NavTarget.LoggedInFlow && (sessionId == null || navTarget.sessionId == sessionId)
|
navTarget is NavTarget.LoggedInFlow && (sessionId == null || navTarget.sessionId == sessionId)
|
||||||
}
|
}
|
||||||
|
.attachSession()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue