mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
Fixes #2179 - Open direct chat directly from the room member details screen
This commit is contained in:
committed by
Stefan Ceriu
parent
742a924037
commit
e4788e615f
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user