mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Cleanup
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#import "TGMessageEntitiesAttachment.h"
|
||||
#import <LegacyComponents/TGMessageEntitiesAttachment.h>
|
||||
|
||||
#import "LegacyComponentsInternal.h"
|
||||
|
||||
#import "PSKeyValueEncoder.h"
|
||||
#import "PSKeyValueDecoder.h"
|
||||
#import <LegacyComponents/PSKeyValueEncoder.h>
|
||||
#import <LegacyComponents/PSKeyValueDecoder.h>
|
||||
|
||||
#import "NSInputStream+TL.h"
|
||||
#import <LegacyComponents/NSInputStream+TL.h>
|
||||
|
||||
@implementation TGMessageEntitiesAttachment
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
- (void)serialize:(NSMutableData *)data
|
||||
{
|
||||
NSData *serializedData = [NSKeyedArchiver archivedDataWithRootObject:self];
|
||||
NSData *serializedData = [NSKeyedArchiver archivedDataWithRootObject:self requiringSecureCoding:false error:nil];
|
||||
int32_t length = (int32_t)serializedData.length;
|
||||
[data appendBytes:&length length:4];
|
||||
[data appendData:serializedData];
|
||||
@@ -56,7 +56,7 @@
|
||||
{
|
||||
int32_t length = [is readInt32];
|
||||
NSData *data = [is readData:length];
|
||||
return [NSKeyedUnarchiver unarchiveObjectWithData:data];
|
||||
return [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaAttachment class] fromData:data error:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user