Branch StartDM in the RoomMemberDetails screen
This commit is contained in:
parent
e8eb9c0840
commit
e55fab29e4
13 changed files with 91 additions and 18 deletions
|
|
@ -256,6 +256,10 @@ class LoggedInFlowNode @AssistedInject constructor(
|
|||
}
|
||||
is NavTarget.Room -> {
|
||||
val callback = object : RoomLoadedFlowNode.Callback {
|
||||
override fun onOpenRoom(roomId: RoomId) {
|
||||
backstack.push(NavTarget.Room(roomId))
|
||||
}
|
||||
|
||||
override fun onForwardedToSingleRoom(roomId: RoomId) {
|
||||
coroutineScope.launch { attachRoom(roomId) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ class RoomLoadedFlowNode @AssistedInject constructor(
|
|||
), DaggerComponentOwner {
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onOpenRoom(roomId: RoomId)
|
||||
fun onForwardedToSingleRoom(roomId: RoomId)
|
||||
fun onOpenGlobalNotificationSettings()
|
||||
}
|
||||
|
|
@ -134,6 +135,10 @@ class RoomLoadedFlowNode @AssistedInject constructor(
|
|||
override fun onOpenGlobalNotificationSettings() {
|
||||
callbacks.forEach { it.onOpenGlobalNotificationSettings() }
|
||||
}
|
||||
|
||||
override fun onOpenRoom(roomId: RoomId) {
|
||||
callbacks.forEach { it.onOpenRoom(roomId) }
|
||||
}
|
||||
}
|
||||
return roomDetailsEntryPoint.nodeBuilder(this, buildContext)
|
||||
.params(RoomDetailsEntryPoint.Params(initialTarget))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue