SP2: Adding Rooms to Spaces #523o

- check permission before adding room
- Added join button in explore room screens
This commit is contained in:
Gil Eluard
2022-02-05 08:20:39 +01:00
parent 5025029843
commit cb7b581fc8
13 changed files with 119 additions and 10 deletions
+16
View File
@@ -309,6 +309,22 @@
}
}
- (void)createNewRoom
{
if (recentsDataSource.currentSpace) {
[recentsDataSource.currentSpace canAddRoomWithCompletion:^(BOOL canAddRoom) {
if (canAddRoom) {
[super createNewRoom];
} else {
[[AppDelegate theDelegate] showAlertWithTitle:[VectorL10n roomRecentsCreateEmptyRoom]
message:[VectorL10n spacesAddRoomMissingPermissionMessage]];
}
}];
} else {
[super createNewRoom];
}
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView