Rename the parameter this it can be a username or a room name.
This commit is contained in:
parent
2c6169c6a6
commit
6e5c973df0
3 changed files with 8 additions and 8 deletions
|
|
@ -87,7 +87,7 @@ class RoomDetailsFlowNode @AssistedInject constructor(
|
||||||
data class RoomMemberDetails(val roomMemberId: UserId) : NavTarget
|
data class RoomMemberDetails(val roomMemberId: UserId) : NavTarget
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
data class AvatarPreview(val userName: String, val avatarUrl: String) : NavTarget
|
data class AvatarPreview(val name: String, val avatarUrl: String) : NavTarget
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
||||||
|
|
@ -110,8 +110,8 @@ class RoomDetailsFlowNode @AssistedInject constructor(
|
||||||
backstack.push(NavTarget.RoomNotificationSettings(showUserDefinedSettingStyle = false))
|
backstack.push(NavTarget.RoomNotificationSettings(showUserDefinedSettingStyle = false))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun openAvatarPreview(username: String, url: String) {
|
override fun openAvatarPreview(name: String, url: String) {
|
||||||
backstack.push(NavTarget.AvatarPreview(username, url))
|
backstack.push(NavTarget.AvatarPreview(name, url))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
createNode<RoomDetailsNode>(buildContext, listOf(roomDetailsCallback))
|
createNode<RoomDetailsNode>(buildContext, listOf(roomDetailsCallback))
|
||||||
|
|
@ -166,7 +166,7 @@ class RoomDetailsFlowNode @AssistedInject constructor(
|
||||||
val mimeType = MimeTypes.Images
|
val mimeType = MimeTypes.Images
|
||||||
val input = MediaViewerNode.Inputs(
|
val input = MediaViewerNode.Inputs(
|
||||||
mediaInfo = MediaInfo(
|
mediaInfo = MediaInfo(
|
||||||
name = navTarget.userName,
|
name = navTarget.name,
|
||||||
mimeType = mimeType,
|
mimeType = mimeType,
|
||||||
formattedFileSize = "",
|
formattedFileSize = "",
|
||||||
fileExtension = ""
|
fileExtension = ""
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ class RoomDetailsNode @AssistedInject constructor(
|
||||||
fun openInviteMembers()
|
fun openInviteMembers()
|
||||||
fun editRoomDetails()
|
fun editRoomDetails()
|
||||||
fun openRoomNotificationSettings()
|
fun openRoomNotificationSettings()
|
||||||
fun openAvatarPreview(username: String, url: String)
|
fun openAvatarPreview(name: String, url: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val callbacks = plugins<Callback>()
|
private val callbacks = plugins<Callback>()
|
||||||
|
|
@ -111,8 +111,8 @@ class RoomDetailsNode @AssistedInject constructor(
|
||||||
callbacks.forEach { it.editRoomDetails() }
|
callbacks.forEach { it.editRoomDetails() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun openAvatarPreview(username: String, url: String) {
|
private fun openAvatarPreview(name: String, url: String) {
|
||||||
callbacks.forEach { it.openAvatarPreview(username, url) }
|
callbacks.forEach { it.openAvatarPreview(name, url) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ fun RoomDetailsView(
|
||||||
openRoomMemberList: () -> Unit,
|
openRoomMemberList: () -> Unit,
|
||||||
openRoomNotificationSettings: () -> Unit,
|
openRoomNotificationSettings: () -> Unit,
|
||||||
invitePeople: () -> Unit,
|
invitePeople: () -> Unit,
|
||||||
openAvatarPreview: (username: String, url: String) -> Unit,
|
openAvatarPreview: (name: String, url: String) -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
fun onShareMember() {
|
fun onShareMember() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue