Merge remote-tracking branch 'origin/develop' into reskin

# Conflicts:
#	Riot/Constants/RiotDesignValues.m
#	Riot/Modules/Authentication/AuthenticationViewController.m
This commit is contained in:
manuroe
2019-01-10 11:50:57 +01:00
31 changed files with 240 additions and 206 deletions
+16 -16
View File
@@ -1224,7 +1224,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
{
if ([AppDelegate theDelegate].mxSessions.count > 0)
{
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
count = session.ignoredUsers.count;
}
else
@@ -1383,7 +1383,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
return cell;
}
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
MXKAccount* account = [MXKAccountManager sharedManager].activeAccounts.firstObject;
if (section == SETTINGS_SECTION_SIGN_OUT_INDEX)
@@ -1626,7 +1626,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
if (!countryCode)
{
// If none, consider the preferred locale
NSLocale *local = [[NSLocale alloc] initWithLocaleIdentifier:[[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]];
NSLocale *local = [[NSLocale alloc] initWithLocaleIdentifier:[[NSBundle mainBundle] preferredLocalizations][0]];
if ([local respondsToSelector:@selector(countryCode)])
{
countryCode = local.countryCode;
@@ -1718,7 +1718,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
{
MXKTableViewCell *globalInfoCell = [self getDefaultTableViewCell:tableView];
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
NSString *appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
globalInfoCell.textLabel.text = [NSString stringWithFormat:NSLocalizedStringFromTable(@"settings_global_settings_info", @"Vector", nil), appDisplayName];
globalInfoCell.textLabel.numberOfLines = 0;
@@ -1879,7 +1879,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
}
NSString* countryCode = [[MXKAppSettings standardAppSettings] phonebookCountryCode];
NSLocale *local = [[NSLocale alloc] initWithLocaleIdentifier:[[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]];
NSLocale *local = [[NSLocale alloc] initWithLocaleIdentifier:[[NSBundle mainBundle] preferredLocalizations][0]];
NSString *countryName = [local displayNameForKey:NSLocaleCountryCode value:countryCode];
cell.textLabel.textColor = kRiotPrimaryTextColor;
@@ -2097,7 +2097,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
}
else if (row == LABS_CRYPTO_INDEX)
{
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
@@ -2265,7 +2265,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
// Check whether this section is visible
if ([AppDelegate theDelegate].mxSessions.count > 0)
{
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
if (session.ignoredUsers.count)
{
return NSLocalizedStringFromTable(@"settings_ignored_users", @"Vector", nil);
@@ -2392,7 +2392,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
{
if ([AppDelegate theDelegate].mxSessions.count > 0)
{
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
if (session.ignoredUsers.count == 0)
{
// Hide this section
@@ -2424,7 +2424,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
{
if ([AppDelegate theDelegate].mxSessions.count > 0)
{
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
if (session.ignoredUsers.count == 0)
{
// Hide this section
@@ -2505,7 +2505,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
}
else if (section == SETTINGS_SECTION_IGNORED_USERS_INDEX)
{
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
NSString *ignoredUserId;
if (indexPath.row < session.ignoredUsers.count)
@@ -2530,7 +2530,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
typeof(self) self = weakSelf;
self->currentAlert = nil;
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
// Remove the member from the ignored user list
[self startActivityIndicator];
@@ -2807,7 +2807,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
__weak typeof(self) weakSelf = self;
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
NSString *appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
currentAlert = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:NSLocalizedStringFromTable(@"settings_on_denied_notification", @"Vector", nil), appDisplayName] message:nil preferredStyle:UIAlertControllerStyleAlert];
@@ -3061,7 +3061,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
{
[self startActivityIndicator];
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
[session enableCrypto:switchButton.isOn success:^{
// When disabling crypto, reset the current device id as it cannot be reused.
@@ -3491,7 +3491,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
// Dismiss the keyboard
[newEmailTextField resignFirstResponder];
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
MXK3PID *new3PID = [[MXK3PID alloc] initWithMedium:kMX3PIDMediumEmail andAddress:newEmailTextField.text];
[new3PID requestValidationTokenWithMatrixRestClient:session.matrixRestClient isDuringRegistration:NO nextLink:nil success:^{
@@ -3582,7 +3582,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
// Dismiss the keyboard
[newPhoneNumberCell.mxkTextField resignFirstResponder];
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
NSString *e164 = [[NBPhoneNumberUtil sharedInstance] format:newPhoneNumber numberFormat:NBEPhoneNumberFormatE164 error:nil];
NSString *msisdn;
@@ -3648,7 +3648,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
{
if ([AppDelegate theDelegate].mxSessions.count > 0)
{
MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
MXMyUser* myUser = session.myUser;
BOOL saveButtonEnabled = (nil != newAvatarImage);