mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Room list avatar accessibility. (#707)
* Hide the avatar when the Dynamic Text is large --------- Co-authored-by: sempruijs <sem@pruijs.net>
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct HomeScreenRoomCell: View {
|
struct HomeScreenRoomCell: View {
|
||||||
|
@Environment(\.dynamicTypeSize) var dynamicTypeSize
|
||||||
@Environment(\.redactionReasons) private var redactionReasons
|
@Environment(\.redactionReasons) private var redactionReasons
|
||||||
|
|
||||||
let room: HomeScreenRoom
|
let room: HomeScreenRoom
|
||||||
@@ -52,12 +53,15 @@ struct HomeScreenRoomCell: View {
|
|||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
var avatar: some View {
|
var avatar: some View {
|
||||||
LoadableAvatarImage(url: room.avatarURL,
|
if dynamicTypeSize < .accessibility3 {
|
||||||
name: room.name,
|
LoadableAvatarImage(url: room.avatarURL,
|
||||||
contentID: room.roomId,
|
name: room.name,
|
||||||
avatarSize: .room(on: .home),
|
contentID: room.roomId,
|
||||||
imageProvider: context.imageProvider)
|
avatarSize: .room(on: .home),
|
||||||
.accessibilityHidden(true)
|
imageProvider: context.imageProvider)
|
||||||
|
.dynamicTypeSize(dynamicTypeSize < .accessibility1 ? dynamicTypeSize : .accessibility1)
|
||||||
|
.accessibilityHidden(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var content: some View {
|
var content: some View {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Hide the avatars when the users has larger font on by Sem Pruijs
|
||||||
Reference in New Issue
Block a user