mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-21 13:04:42 +00:00
Fix attempt assign NSString to NSNumber.
Adds missing nullability annotations.
This commit is contained in:
parent
5edbdac3cb
commit
6a661b9500
@ -13,14 +13,14 @@
|
||||
@class LOTLayerGroup;
|
||||
@interface LOTAssetGroup : NSObject
|
||||
|
||||
- (instancetype)initWithJSON:(NSArray *)jsonArray;
|
||||
- (instancetype _Nonnull)initWithJSON:(NSArray * _Nonnull)jsonArray;
|
||||
|
||||
- (void)buildAssetNamed:(NSString *)refID
|
||||
- (void)buildAssetNamed:(NSString * _Nonnull)refID
|
||||
withBounds:(CGRect)bounds
|
||||
andFramerate:(NSNumber * _Nullable)framerate;
|
||||
|
||||
- (void)finalizeInitialization;
|
||||
|
||||
- (LOTAsset *)assetModelForID:(NSNumber *)assetID;
|
||||
- (LOTAsset * _Nullable)assetModelForID:(NSString * _Nonnull)assetID;
|
||||
|
||||
@end
|
||||
|
@ -10,8 +10,8 @@
|
||||
#import "LOTAsset.h"
|
||||
|
||||
@implementation LOTAssetGroup {
|
||||
NSMutableDictionary *_assetMap;
|
||||
NSDictionary *_assetJSONMap;
|
||||
NSMutableDictionary<NSString *, LOTAsset *> *_assetMap;
|
||||
NSDictionary<NSString *, NSDictionary *> *_assetJSONMap;
|
||||
}
|
||||
|
||||
- (instancetype)initWithJSON:(NSArray *)jsonArray {
|
||||
@ -19,7 +19,7 @@
|
||||
if (self) {
|
||||
_assetMap = [NSMutableDictionary dictionary];
|
||||
NSMutableDictionary *assetJSONMap = [NSMutableDictionary dictionary];
|
||||
for (NSDictionary *assetDictionary in jsonArray) {
|
||||
for (NSDictionary<NSString *, NSString *> *assetDictionary in jsonArray) {
|
||||
NSString *referenceID = assetDictionary[@"id"];
|
||||
if (referenceID) {
|
||||
assetJSONMap[referenceID] = assetDictionary;
|
||||
@ -55,7 +55,7 @@
|
||||
_assetJSONMap = nil;
|
||||
}
|
||||
|
||||
- (LOTAsset *)assetModelForID:(NSNumber *)assetID {
|
||||
- (LOTAsset *)assetModelForID:(NSString *)assetID {
|
||||
return _assetMap[assetID];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user