Make joining public rooms configurable

This commit is contained in:
Gil Eluard
2021-04-13 19:21:07 +02:00
parent 6cb1cf6c0b
commit c4fe2f9fa7
3 changed files with 25 additions and 3 deletions
@@ -1808,9 +1808,16 @@
return;
}
self.roomsDirectoryCoordinatorBridgePresenter = [[RoomsDirectoryCoordinatorBridgePresenter alloc] initWithSession:self.mainSession dataSource:[self.recentsDataSource.publicRoomsDirectoryDataSource copy]];
self.roomsDirectoryCoordinatorBridgePresenter.delegate = self;
[self.roomsDirectoryCoordinatorBridgePresenter presentFrom:self animated:YES];
if (RiotSettings.shared.roomsAllowToJoinPublicRooms)
{
self.roomsDirectoryCoordinatorBridgePresenter = [[RoomsDirectoryCoordinatorBridgePresenter alloc] initWithSession:self.mainSession dataSource:[self.recentsDataSource.publicRoomsDirectoryDataSource copy]];
self.roomsDirectoryCoordinatorBridgePresenter.delegate = self;
[self.roomsDirectoryCoordinatorBridgePresenter presentFrom:self animated:YES];
}
else
{
[self createNewRoom];
}
}
- (void)openPublicRoom:(MXPublicRoom *)publicRoom