SP2: Adding Rooms to Spaces element-ios#5230

- Added room ID to cancel callback as the room may have been upgraded
This commit is contained in:
Gil Eluard
2022-01-17 22:11:12 +01:00
parent 29e558ed9e
commit f98053e77a
6 changed files with 37 additions and 16 deletions
@@ -4202,10 +4202,18 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
#pragma mark - RoomAccessCoordinatorBridgePresenterDelegate
- (void)roomAccessCoordinatorBridgePresenterDelegateDidCancel:(RoomAccessCoordinatorBridgePresenter *)coordinatorBridgePresenter
- (void)roomAccessCoordinatorBridgePresenterDelegate:(RoomAccessCoordinatorBridgePresenter *)coordinatorBridgePresenter didCancelRoomWithId:(NSString *)roomId
{
[roomAccessPresenter dismissWithAnimated:YES completion:nil];
roomAccessPresenter = nil;
if (![roomId isEqualToString: self.roomId]) {
// Room Access Coordinator upgraded the actual room -> Need to move to replacement room
[self.delegate roomSettingsViewController:self didMoveRoomTo:roomId];
}
MXWeakify(self);
[roomAccessPresenter dismissWithAnimated:YES completion:^{
MXStrongifyAndReturnIfNil(self);
self->roomAccessPresenter = nil;
}];
}
- (void)roomAccessCoordinatorBridgePresenterDelegate:(RoomAccessCoordinatorBridgePresenter *)coordinatorBridgePresenter didCompleteRoomWithId:(NSString *)roomId