mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
implemented the presentation of transfer ownership screen from the space flow and update UI and preview tests
This commit is contained in:
@@ -20,8 +20,7 @@ struct LeaveSpaceRoomDetailsCell: View {
|
||||
|
||||
private var subtitle: String? {
|
||||
guard !room.spaceServiceRoom.isSpace else { return nil }
|
||||
let memberCount = L10n.commonMemberCount(room.spaceServiceRoom.joinedMembersCount)
|
||||
return !room.canLeave ? L10n.screenLeaveSpaceLastAdminInfo(memberCount) : memberCount
|
||||
return L10n.commonMemberCount(room.spaceServiceRoom.joinedMembersCount)
|
||||
}
|
||||
|
||||
var visibilityIcon: KeyPath<CompoundIcons, Image>? {
|
||||
|
||||
@@ -94,10 +94,8 @@ struct LeaveSpaceView: View {
|
||||
case .spaceNeedsNewOwner(let useTransferOwnershipFlow):
|
||||
if context.viewState.canEditRolesAndPermissions {
|
||||
if useTransferOwnershipFlow {
|
||||
Button(role: .destructive) {
|
||||
Button(L10n.leaveRoomAlertSelectNewOwnerAction, role: .destructive) {
|
||||
context.send(viewAction: .transferOwnership)
|
||||
} label: {
|
||||
Label(L10n.actionGoToRolesAndPermissions, icon: \.settings)
|
||||
}
|
||||
.buttonStyle(.compound(.primary))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user