Add generic annotations for MXKAccountManager
MODIFY
MatrixKit/Models/Account/MXKAccountManager.h
MatrixKit/Models/Account/MXKAccountManager.h
@@ -45,12 +45,12 @@ extern NSString *const kMXKAccountManagerDidRemoveAccountNotification;
/**
List of all available accounts (enabled and disabled).
*/
-@property (nonatomic, readonly) NSArray* accounts;
+@property (nonatomic, readonly) NSArray<MXKAccount *> *accounts;
/**
List of active accounts (only enabled accounts)
*/
-@property (nonatomic, readonly) NSArray* activeAccounts;
+@property (nonatomic, readonly) NSArray<MXKAccount *> *activeAccounts;
/**
The device token used for Apple Push Notification Service registration.

MODIFY
MatrixKit/Models/Account/MXKAccountManager.m
MatrixKit/Models/Account/MXKAccountManager.m
@@ -28,7 +28,7 @@ NSString *const kMXKAccountManagerDidRemoveAccountNotification = @"kMXKAccountMa
/**
The list of all accounts (enabled and disabled). Each value is a `MXKAccount` instance.
*/
- NSMutableArray *mxAccounts;
+ NSMutableArray<MXKAccount *> *mxAccounts;
}
@end
@@ -254,12 +254,12 @@ NSString *const kMXKAccountManagerDidRemoveAccountNotification = @"kMXKAccountMa
_storeClass = storeClass;
}
-- (NSArray *)accounts
+- (NSArray<MXKAccount *> *)accounts
{
return [mxAccounts copy];
}
-- (NSArray *)activeAccounts
+- (NSArray<MXKAccount *> *)activeAccounts
{
NSMutableArray *activeAccounts = [NSMutableArray arrayWithCapacity:mxAccounts.count];
for (MXKAccount *account in mxAccounts)
@@ -269,7 +269,7 @@ NSString *const kMXKAccountManagerDidRemoveAccountNotification = @"kMXKAccountMa
[activeAccounts addObject:account];
}
}
- return activeAccounts;
+ return [activeAccounts copy];
}
- (NSData *)apnsDeviceToken

Add generic annotations for MXKAccountManager