Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Ivan Sein 2018-05-22 16:41:52 +02:00
Родитель 087c3bb126
Коммит 8e59e045ee
2 изменённых файлов: 13 добавлений и 6 удалений

Просмотреть файл

@ -220,12 +220,15 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *index = [_indexes objectAtIndex:indexPath.section];
NSArray *participants = [_participants objectForKey:index];
NSString *index = nil;
NSArray *participants = nil;
if (_searchController.active) {
index = [_resultTableViewController.indexes objectAtIndex:indexPath.section];
participants = [_resultTableViewController.contacts objectForKey:index];
} else {
index = [_indexes objectAtIndex:indexPath.section];
participants = [_participants objectForKey:index];
}
NCUser *participant = [participants objectAtIndex:indexPath.row];

Просмотреть файл

@ -183,12 +183,15 @@ NSString * const NCSelectedContactForVideoCallNotification = @"NCSelectedContact
- (void)presentJoinCallOptionsForContactAtIndexPath:(NSIndexPath *)indexPath
{
NSString *index = [_indexes objectAtIndex:indexPath.section];
NSArray *contacts = [_contacts objectForKey:index];
NSString *index = nil;
NSArray *contacts = nil;
if (_searchController.active) {
index = [_resultTableViewController.indexes objectAtIndex:indexPath.section];
contacts = [_resultTableViewController.contacts objectForKey:index];
} else {
index = [_indexes objectAtIndex:indexPath.section];
contacts = [_contacts objectForKey:index];
}
NCUser *contact = [contacts objectAtIndex:indexPath.row];
@ -219,8 +222,9 @@ NSString * const NCSelectedContactForVideoCallNotification = @"NCSelectedContact
[optionsActionSheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
// Presentation on iPads
optionsActionSheet.popoverPresentationController.sourceView = self.tableView;
optionsActionSheet.popoverPresentationController.sourceRect = [self.tableView rectForRowAtIndexPath:indexPath];
UITableView *tableView = (_searchController.active) ? _resultTableViewController.tableView : self.tableView;
optionsActionSheet.popoverPresentationController.sourceView = tableView;
optionsActionSheet.popoverPresentationController.sourceRect = [tableView rectForRowAtIndexPath:indexPath];
[self presentViewController:optionsActionSheet animated:YES completion:nil];
}