Fixes #2179 - Open direct chat directly from the room member details screen

This commit is contained in:
Stefan Ceriu
2023-11-29 13:57:32 +02:00
committed by Stefan Ceriu
parent 742a924037
commit e4788e615f
9 changed files with 76 additions and 6 deletions
@@ -25,6 +25,7 @@ struct RoomMemberDetailsScreen: View {
headerSection
if !context.viewState.details.isAccountOwner {
directChatSection
blockUserSection
}
}
@@ -58,6 +59,17 @@ struct RoomMemberDetailsScreen: View {
}
}
}
private var directChatSection: some View {
Section {
ListRow(label: .default(title: L10n.commonDirectChat,
icon: \.chat),
kind: .button {
context.send(viewAction: .openDirectChat)
})
.accessibilityIdentifier(A11yIdentifiers.roomMemberDetailsScreen.directChat)
}
}
private var blockUserSection: some View {
Section {