mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 01:52:44 +02:00
Fixed various project warnings. Completely disabled nullability checks, went down from ~20k to 195.
This commit is contained in:
committed by
Stefan Ceriu
parent
e0437b0124
commit
bc60512101
@@ -104,6 +104,8 @@ NSString *const MXKAccountManagerDataType = @"org.matrix.kit.MXKAccountManagerDa
|
||||
}
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
- (void)saveAccounts
|
||||
{
|
||||
NSDate *startDate = [NSDate date];
|
||||
@@ -123,6 +125,7 @@ NSString *const MXKAccountManagerDataType = @"org.matrix.kit.MXKAccountManagerDa
|
||||
|
||||
MXLogDebug(@"[MXKAccountManager] saveAccounts. Done (result: %@) in %.0fms", @(result), [[NSDate date] timeIntervalSinceDate:startDate] * 1000);
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (void)addAccount:(MXKAccount *)account andOpenSession:(BOOL)openSession
|
||||
{
|
||||
@@ -608,6 +611,8 @@ NSString *const MXKAccountManagerDataType = @"org.matrix.kit.MXKAccountManagerDa
|
||||
return [matrixKitCacheFolder stringByAppendingPathComponent:kMXKAccountsKey];
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
- (void)loadAccounts
|
||||
{
|
||||
MXLogDebug(@"[MXKAccountManager] loadAccounts");
|
||||
@@ -675,6 +680,7 @@ NSString *const MXKAccountManagerDataType = @"org.matrix.kit.MXKAccountManagerDa
|
||||
mxAccounts = [NSMutableArray array];
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (NSData*)encryptData:(NSData*)data
|
||||
{
|
||||
@@ -708,6 +714,8 @@ NSString *const MXKAccountManagerDataType = @"org.matrix.kit.MXKAccountManagerDa
|
||||
return data;
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
- (void)migrateAccounts
|
||||
{
|
||||
NSString *pathOld = [[MXKAppSettings cacheFolder] stringByAppendingPathComponent:kMXKAccountsKeyOld];
|
||||
@@ -727,6 +735,7 @@ NSString *const MXKAccountManagerDataType = @"org.matrix.kit.MXKAccountManagerDa
|
||||
[fileManager removeItemAtPath:pathOld error:nil];
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (void)readAndWriteCredentials:(void (^)(NSArray<MXCredentials*> * _Nullable readData, void (^completion)(BOOL didUpdateCredentials)))readAnWriteHandler
|
||||
{
|
||||
|
||||
@@ -93,6 +93,8 @@ extern NSString *const kMXKContactDefaultContactPrefixId;
|
||||
*/
|
||||
- (void)resetMatrixThumbnail;
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
/**
|
||||
The contact ID from native phonebook record
|
||||
*/
|
||||
@@ -105,6 +107,7 @@ extern NSString *const kMXKContactDefaultContactPrefixId;
|
||||
@return MXKContact instance
|
||||
*/
|
||||
- (id)initLocalContactWithABRecord:(ABRecordRef)record;
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
/**
|
||||
Create a matrix contact with the dedicated info
|
||||
|
||||
@@ -40,6 +40,8 @@ NSString *const kMXKContactDefaultContactPrefixId = @"Default_";
|
||||
@implementation MXKContact
|
||||
@synthesize isMatrixContact, isThirdPartyInvite;
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
+ (NSString*)contactID:(ABRecordRef)record
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@%d", kMXKContactLocalContactPrefixId, ABRecordGetRecordID(record)];
|
||||
@@ -217,6 +219,7 @@ NSString *const kMXKContactDefaultContactPrefixId = @"Default_";
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (id)initMatrixContactWithDisplayName:(NSString*)displayName andMatrixID:(NSString*)matrixID
|
||||
{
|
||||
|
||||
@@ -537,6 +537,8 @@ NSString *const MXKContactManagerDataType = @"org.matrix.kit.MXKContactManagerDa
|
||||
}
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
- (void)refreshLocalContacts
|
||||
{
|
||||
MXLogDebug(@"[MXKContactManager] refreshLocalContacts : Started");
|
||||
@@ -721,6 +723,7 @@ NSString *const MXKContactManagerDataType = @"org.matrix.kit.MXKContactManagerDa
|
||||
});
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (void)updateMatrixIDsForLocalContact:(MXKContact *)contact
|
||||
{
|
||||
@@ -1582,6 +1585,9 @@ static NSString *matrixIDsDictFile = @"matrixIDsDictV2";
|
||||
static NSString *localContactsFile = @"localContactsV2";
|
||||
static NSString *contactsBookInfoFile = @"contactsV2";
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
- (NSString*)dataFilePathForComponent:(NSString*)component
|
||||
{
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
@@ -1857,6 +1863,8 @@ static NSString *contactsBookInfoFile = @"contactsV2";
|
||||
}
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (BOOL)encryptAndSaveData:(NSData*)data toFile:(NSString*)fileName
|
||||
{
|
||||
NSError *error = nil;
|
||||
|
||||
@@ -670,6 +670,8 @@ static NSString *const kMXAppGroupID = @"group.org.matrix";
|
||||
}
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
- (NSString*)phonebookCountryCode
|
||||
{
|
||||
NSString* res = phonebookCountryCode;
|
||||
@@ -699,6 +701,7 @@ static NSString *const kMXAppGroupID = @"group.org.matrix";
|
||||
|
||||
return res;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (void)setPhonebookCountryCode:(NSString *)stringValue
|
||||
{
|
||||
|
||||
@@ -30,8 +30,8 @@ extern NSString *const kMXKRecentCellIdentifier;
|
||||
|
||||
/**
|
||||
The recents data source based on a unique matrix session.
|
||||
Deprecated: Please see MXSession.roomListDataManager
|
||||
*/
|
||||
MXK_DEPRECATED_ATTRIBUTE_WITH_MSG("See MXSession.roomListDataManager")
|
||||
@interface MXKSessionRecentsDataSource : MXKDataSource {
|
||||
|
||||
@protected
|
||||
|
||||
Reference in New Issue
Block a user