mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
increas hit area for the media preview upload warning, and hide accessibility for the avatar in the mention suggestions view
This commit is contained in:
@@ -82,6 +82,9 @@ struct MediaUploadPreviewScreen: View {
|
||||
context.isPresentingMediaCaptionWarning = true
|
||||
} label: {
|
||||
CompoundIcon(\.infoSolid, size: .xSmall, relativeTo: .compound.bodyLG)
|
||||
// Increase hit area
|
||||
.padding(.leading, 5)
|
||||
.padding(.vertical, 2)
|
||||
}
|
||||
.tint(.compound.iconCriticalPrimary)
|
||||
.popover(isPresented: $context.isPresentingMediaCaptionWarning, arrowEdge: .bottom) {
|
||||
|
||||
+15
-8
@@ -13,14 +13,8 @@ struct MentionSuggestionItemView: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .center, spacing: 16) {
|
||||
switch item.suggestionType {
|
||||
case .user(let user):
|
||||
LoadableAvatarImage(url: user.avatarURL, name: user.displayName, contentID: user.id, avatarSize: .user(on: .completionSuggestions), mediaProvider: mediaProvider)
|
||||
case .allUsers(let avatar):
|
||||
RoomAvatarImage(avatar: avatar, avatarSize: .room(on: .completionSuggestions), mediaProvider: mediaProvider)
|
||||
case .room(let room):
|
||||
RoomAvatarImage(avatar: room.avatar, avatarSize: .room(on: .completionSuggestions), mediaProvider: mediaProvider)
|
||||
}
|
||||
avatar
|
||||
.accessibilityHidden(true)
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(item.displayName)
|
||||
.font(.compound.bodyLG)
|
||||
@@ -34,6 +28,19 @@ struct MentionSuggestionItemView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.accessibilityElement(children: .combine)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var avatar: some View {
|
||||
switch item.suggestionType {
|
||||
case .user(let user):
|
||||
LoadableAvatarImage(url: user.avatarURL, name: user.displayName, contentID: user.id, avatarSize: .user(on: .completionSuggestions), mediaProvider: mediaProvider)
|
||||
case .allUsers(let avatar):
|
||||
RoomAvatarImage(avatar: avatar, avatarSize: .room(on: .completionSuggestions), mediaProvider: mediaProvider)
|
||||
case .room(let room):
|
||||
RoomAvatarImage(avatar: room.avatar, avatarSize: .room(on: .completionSuggestions), mediaProvider: mediaProvider)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user