mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Add hooks for room creation and privacy & security settings screen. (#6270)
Add hooks for the create room and security and privacy screens.
This commit is contained in:
@@ -21,6 +21,7 @@ struct SecurityAndPrivacyScreenViewState: BindableState {
|
||||
|
||||
var canonicalAlias: String?
|
||||
var isKnockingEnabled: Bool
|
||||
var isPublicAccessAllowed = true
|
||||
var isSpace: Bool
|
||||
|
||||
var canEditAddress = false
|
||||
@@ -57,6 +58,11 @@ struct SecurityAndPrivacyScreenViewState: BindableState {
|
||||
return options.sorted()
|
||||
}
|
||||
|
||||
/// Keeps the option visible on rooms that are already public so the current state is shown.
|
||||
var isAnyoneOptionAvailable: Bool {
|
||||
currentSettings.accessType == .anyone || isPublicAccessAllowed
|
||||
}
|
||||
|
||||
var isSpaceMembersOptionAvailable: Bool {
|
||||
currentSettings.accessType.isSpaceMembers || isSpaceMembersOptionSelectable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user