Fixed various project warnings. Completely disabled nullability checks, went down from ~20k to 195.

This commit is contained in:
Stefan Ceriu
2022-02-07 14:26:47 +02:00
committed by Stefan Ceriu
parent e0437b0124
commit bc60512101
85 changed files with 465 additions and 679 deletions
@@ -431,7 +431,7 @@
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
inputsAlert = nil;
self->inputsAlert = nil;
}]];
@@ -551,10 +551,10 @@
}
// Check whether a second 3pid is available
_isThirdPartyIdentifierPending = (!self.emailContainer.isHidden && self.emailTextField.text.length && ![self isFlowCompleted:kMXLoginFlowTypeEmailIdentity]);
self->_isThirdPartyIdentifierPending = (!self.emailContainer.isHidden && self.emailTextField.text.length && ![self isFlowCompleted:kMXLoginFlowTypeEmailIdentity]);
// Launch msisdn validation
NSString *e164 = [[NBPhoneNumberUtil sharedInstance] format:nbPhoneNumber numberFormat:NBEPhoneNumberFormatE164 error:nil];
NSString *e164 = [[NBPhoneNumberUtil sharedInstance] format:self->nbPhoneNumber numberFormat:NBEPhoneNumberFormatE164 error:nil];
NSString *msisdn;
if ([e164 hasPrefix:@"+"])
{
@@ -564,12 +564,12 @@
{
msisdn = [e164 substringFromIndex:2];
}
submittedMSISDN = [[MXK3PID alloc] initWithMedium:kMX3PIDMediumMSISDN andAddress:msisdn];
[submittedMSISDN requestValidationTokenWithMatrixRestClient:restClient
isDuringRegistration:YES
nextLink:nil
success:^
self->submittedMSISDN = [[MXK3PID alloc] initWithMedium:kMX3PIDMediumMSISDN andAddress:msisdn];
[self->submittedMSISDN requestValidationTokenWithMatrixRestClient:restClient
isDuringRegistration:YES
nextLink:nil
success:^
{
[self showValidationMSISDNDialogToPrepareParameters:callback];
@@ -763,7 +763,7 @@
{
NSDictionary *parameters = @{
@"auth": @{
@"session":currentSession.session,
@"session": self->currentSession.session,
@"response": response,
@"type": kMXLoginFlowTypeRecaptcha
},
@@ -870,7 +870,7 @@
{
// We finalize here a registration triggered from external inputs. All the required data are handled by the session id
NSDictionary *parameters = @{
@"auth": @{@"session": currentSession.session, @"response": response, @"type": kMXLoginFlowTypeRecaptcha},
@"auth": @{@"session": self->currentSession.session, @"response": response, @"type": kMXLoginFlowTypeRecaptcha},
};
callback (parameters, nil);
}
@@ -1705,7 +1705,7 @@
if (weakSelf)
{
typeof(self) self = weakSelf;
UITextField *textField = [inputsAlert textFields].firstObject;
UITextField *textField = [self->inputsAlert textFields].firstObject;
NSString *smsCode = textField.text;
self->inputsAlert = nil;
@@ -1776,9 +1776,9 @@
self->inputsAlert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
[inputsAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self->inputsAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
if (weakSelf)
{