Always open manage member sheet (#4110)

* always open manage member sheet

* Update ElementX/Sources/Screens/ManageRoomMemberSheet/ManageRoomMemberSheetModels.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update ElementX/Sources/Screens/ManageRoomMemberSheet/ManageRoomMemberSheetModels.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* pr suggestions and handled the buttons actions correctly

* Update ElementX/Sources/Screens/ManageRoomMemberSheet/View/ManageRoomMemberSheetView.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* fixed some compilation errors

* added some documentation

* using a struct instead of a protocol

* using arguments instead of a struct

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
Mauro
2025-05-19 16:17:57 +02:00
committed by GitHub
parent 4f4b4b236d
commit 9a8819ac26
25 changed files with 334 additions and 170 deletions
@@ -110,6 +110,23 @@ struct AvatarHeaderView<Footer: View>: View {
badges = isVerified ? [.verified] : []
}
/// Initialises the view by using the sender,
/// only to be used when a room member has not been loaded yet.
init(sender: TimelineItemSender,
avatarSize: Avatars.Size,
mediaProvider: MediaProviderProtocol? = nil,
onAvatarTap: ((URL) -> Void)? = nil,
@ViewBuilder footer: @escaping () -> Footer) {
let profile = UserProfileProxy(sender: sender)
self.init(user: profile,
isVerified: false,
avatarSize: avatarSize,
mediaProvider: mediaProvider,
onAvatarTap: onAvatarTap,
footer: footer)
}
private var badgesStack: some View {
HStack(spacing: 8) {
ForEach(badges, id: \.self) { badge in