SP4: space settings (#5730)

* SP4: Space Settings

- Space settings screen implemented
- No space upgrade available as per Element web
- Need more insights for the space address field
- Added settings live update
- Added local alias implementation
This commit is contained in:
Gil Eluard
2022-03-04 12:53:42 +01:00
committed by GitHub
parent ee04e94e8b
commit 3347354216
43 changed files with 2184 additions and 118 deletions
@@ -94,7 +94,7 @@ class SpaceCreationSettingsService: SpaceCreationSettingsServiceProtocol {
}
private func updateDefaultAddress() {
defaultAddress = roomName.toValidAliasLocalPart()
defaultAddress = MXTools.validAliasLocalPart(from: roomName)
}
private func validateAddress() {
@@ -102,7 +102,7 @@ class SpaceCreationSettingsService: SpaceCreationSettingsServiceProtocol {
currentOperation = nil
guard let userDefinedAddress = self.userDefinedAddress, !userDefinedAddress.isEmpty else {
let fullAddress = defaultAddress.fullLocalAlias(with: session)
let fullAddress = MXTools.fullLocalAlias(from: defaultAddress, with: session)
if defaultAddress.isEmpty {
addressValidationSubject.send(.none(fullAddress))
@@ -116,7 +116,7 @@ class SpaceCreationSettingsService: SpaceCreationSettingsServiceProtocol {
}
private func validate(_ aliasLocalPart: String) {
let fullAddress = aliasLocalPart.fullLocalAlias(with: session)
let fullAddress = MXTools.fullLocalAlias(from: aliasLocalPart, with: session)
currentOperation = MXRoomAliasAvailabilityChecker.validate(aliasLocalPart: aliasLocalPart, with: session) { [weak self] result in
guard let self = self else { return }