Warn explicitly that your addressbook's emails are uploaded for discovering matrix IDs if you enable that permission (#602)

* Settings: Add "LOCAL CONTACTS" > "Use emails to discover users" toggle button

Related to #551

* Users discovery: Warn explicitly that your addressbook's emails are uploaded for discovering matrix IDs if you enable that permission #551.

* FR keyboard typo
This commit is contained in:
manuroe
2016-09-12 09:46:23 +02:00
committed by GitHub
parent 45f52d3422
commit d571de0b73
4 changed files with 78 additions and 14 deletions
@@ -1684,13 +1684,21 @@
{
self.isAddParticipantSearchBarEditing = YES;
searchBar.showsCancelButton = YES;
if (![MXKAppSettings standardAppSettings].syncLocalContacts)
// If not requested yet, ask user permission to sync their local contacts
if (![MXKAppSettings standardAppSettings].syncLocalContacts && ![MXKAppSettings standardAppSettings].syncLocalContactsPermissionRequested)
{
// Allow local contacts sync in order to add address book emails in search result
[MXKAppSettings standardAppSettings].syncLocalContacts = YES;
[MXKAppSettings standardAppSettings].syncLocalContactsPermissionRequested = YES;
[MXKContactManager requestUserConfirmationForLocalContactsSyncInViewController:self completionHandler:^(BOOL granted) {
if (granted)
{
// Allow local contacts sync in order to add address book emails in search result
[MXKAppSettings standardAppSettings].syncLocalContacts = YES;
}
}];
}
return YES;
}