mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user