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:
mxandreas
2026-10-06 12:05:49 +03:00
committed by GitHub
parent 60c11c8172
commit 4640f9cec0
19 changed files with 131 additions and 40 deletions
@@ -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
}