mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Add the initial implementation for managing spaces. (#4963)
This isn't hooked up into the flows yet.
This commit is contained in:
@@ -76,6 +76,15 @@ class SpaceServiceProxy: SpaceServiceProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func removeChild(_ childID: String, from spaceID: String) async -> Result<Void, SpaceServiceProxyError> {
|
||||
do {
|
||||
return try await .success(spaceService.removeChildFromSpace(childId: childID, spaceId: spaceID))
|
||||
} catch {
|
||||
MXLog.error("Failed to remove child \(childID) to space \(spaceID)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func handleUpdates(_ updates: [SpaceListUpdate]) {
|
||||
|
||||
@@ -26,4 +26,5 @@ protocol SpaceServiceProxyProtocol {
|
||||
|
||||
/// Adds a room (or space) as a child of another space.
|
||||
func addChild(_ childID: String, to spaceID: String) async -> Result<Void, SpaceServiceProxyError>
|
||||
func removeChild(_ childID: String, from spaceID: String) async -> Result<Void, SpaceServiceProxyError>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user