Display avatars full screen when tapping on them from the room or member detail screens

This commit is contained in:
Stefan Ceriu
2023-08-04 15:44:37 +03:00
committed by Stefan Ceriu
parent 68f8bfed53
commit 3515494a10
13 changed files with 132 additions and 22 deletions
@@ -23,15 +23,20 @@ struct AvatarHeaderView<Footer: View>: View {
let avatarSize: AvatarSize
let imageProvider: ImageProviderProtocol?
let subtitle: String?
var onAvatarTap: (() -> Void)?
@ViewBuilder var footer: () -> Footer
var body: some View {
VStack(spacing: 8.0) {
LoadableAvatarImage(url: avatarUrl,
name: name,
contentID: id,
avatarSize: avatarSize,
imageProvider: imageProvider)
Button {
onAvatarTap?()
} label: {
LoadableAvatarImage(url: avatarUrl,
name: name,
contentID: id,
avatarSize: avatarSize,
imageProvider: imageProvider)
}
Text(name ?? id)
.foregroundColor(.compound.textPrimary)