SP2: Adding Rooms to Spaces #523o

- update after review
This commit is contained in:
Gil Eluard
2022-02-15 22:23:12 +01:00
parent 7c488b8d72
commit a08291429d
10 changed files with 31 additions and 33 deletions
@@ -44,8 +44,11 @@ class AddRoomItemsProcessor: MatrixItemChooserProcessorProtocol {
// MARK: Private
// Add room with roomId from list of room IDs at index to the parentSpace.
// Recurse to the next index once done.
func addChild(from roomIds: [String], at index: Int, completion: @escaping (Result<Void, Error>) -> Void) {
guard index < roomIds.count else {
// last item has been processed or list is empty --> the recursion has finished
completion(Result.success(()))
return
}