Provide calculated server names when opening a room from another (#5155)
* Provide calculated server names when opening a room from another, based on the most frequently used domain names in the user ids for the users in the room. This helps when following permalinks or navigating to the successor room of a tombstoned one. Previously, the `/summary` endpoint was failing because no server names were used in the `via` parameters.
This commit is contained in:
parent
1a31e49f1e
commit
516c3cfda3
16 changed files with 54 additions and 27 deletions
|
|
@ -335,8 +335,8 @@ class LoggedInFlowNode @AssistedInject constructor(
|
|||
}
|
||||
is NavTarget.Room -> {
|
||||
val callback = object : JoinedRoomLoadedFlowNode.Callback {
|
||||
override fun onOpenRoom(roomId: RoomId) {
|
||||
backstack.push(NavTarget.Room(roomId.toRoomIdOrAlias()))
|
||||
override fun onOpenRoom(roomId: RoomId, serverNames: List<String>) {
|
||||
backstack.push(NavTarget.Room(roomId.toRoomIdOrAlias(), serverNames))
|
||||
}
|
||||
|
||||
override fun onForwardedToSingleRoom(roomId: RoomId) {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class JoinedRoomLoadedFlowNode @AssistedInject constructor(
|
|||
plugins = plugins,
|
||||
), DaggerComponentOwner {
|
||||
interface Callback : Plugin {
|
||||
fun onOpenRoom(roomId: RoomId)
|
||||
fun onOpenRoom(roomId: RoomId, serverNames: List<String>)
|
||||
fun onPermalinkClick(data: PermalinkData, pushToBackstack: Boolean)
|
||||
fun onForwardedToSingleRoom(roomId: RoomId)
|
||||
fun onOpenGlobalNotificationSettings()
|
||||
|
|
@ -121,8 +121,8 @@ class JoinedRoomLoadedFlowNode @AssistedInject constructor(
|
|||
callbacks.forEach { it.onOpenGlobalNotificationSettings() }
|
||||
}
|
||||
|
||||
override fun onOpenRoom(roomId: RoomId) {
|
||||
callbacks.forEach { it.onOpenRoom(roomId) }
|
||||
override fun onOpenRoom(roomId: RoomId, serverNames: List<String>) {
|
||||
callbacks.forEach { it.onOpenRoom(roomId, serverNames) }
|
||||
}
|
||||
|
||||
override fun onPermalinkClick(data: PermalinkData, pushToBackstack: Boolean) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue