Rename eventId to focusedEventId for clarity.
This commit is contained in:
parent
986f20b526
commit
1fcaf902e0
6 changed files with 11 additions and 11 deletions
|
|
@ -35,7 +35,7 @@ interface MessagesEntryPoint : FeatureEntryPoint {
|
|||
}
|
||||
|
||||
data class Params(
|
||||
val eventId: EventId?,
|
||||
val focusedEventId: EventId?,
|
||||
)
|
||||
|
||||
interface Callback : Plugin {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class DefaultMessagesEntryPoint @Inject constructor() : MessagesEntryPoint {
|
|||
|
||||
return object : MessagesEntryPoint.NodeBuilder {
|
||||
override fun params(params: MessagesEntryPoint.Params): MessagesEntryPoint.NodeBuilder {
|
||||
plugins += MessagesNode.Inputs(eventId = params.eventId)
|
||||
plugins += MessagesNode.Inputs(focusedEventId = params.focusedEventId)
|
||||
return this
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class MessagesFlowNode @AssistedInject constructor(
|
|||
private val createPollEntryPoint: CreatePollEntryPoint,
|
||||
) : BaseFlowNode<MessagesFlowNode.NavTarget>(
|
||||
backstack = BackStack(
|
||||
initialElement = NavTarget.Messages(plugins.filterIsInstance<Inputs>().firstOrNull()?.eventId),
|
||||
initialElement = NavTarget.Messages(plugins.filterIsInstance<Inputs>().firstOrNull()?.focusedEventId),
|
||||
savedStateMap = buildContext.savedStateMap,
|
||||
),
|
||||
overlay = Overlay(
|
||||
|
|
@ -90,7 +90,7 @@ class MessagesFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins
|
||||
) {
|
||||
data class Inputs(val eventId: EventId?) : NodeInputs
|
||||
data class Inputs(val focusedEventId: EventId?) : NodeInputs
|
||||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
|
|
@ -98,7 +98,7 @@ class MessagesFlowNode @AssistedInject constructor(
|
|||
|
||||
@Parcelize
|
||||
data class Messages(
|
||||
val eventId: EventId? = null,
|
||||
val focusedEventId: EventId? = null,
|
||||
) : NavTarget
|
||||
|
||||
@Parcelize
|
||||
|
|
@ -192,7 +192,7 @@ class MessagesFlowNode @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
val params = MessagesNode.Inputs(
|
||||
eventId = navTarget.eventId,
|
||||
focusedEventId = navTarget.focusedEventId,
|
||||
)
|
||||
createNode<MessagesNode>(buildContext, listOf(callback, params))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class MessagesNode @AssistedInject constructor(
|
|||
private val callback = plugins<Callback>().firstOrNull()
|
||||
|
||||
// TODO Handle navigation to the Event
|
||||
data class Inputs(val eventId: EventId?) : NodeInputs
|
||||
data class Inputs(val focusedEventId: EventId?) : NodeInputs
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onRoomDetailsClicked()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue