1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 17:38:07 +01:00
Telegram/Watch/Bridge/TGBridgeStickerPack.m
2015-10-01 19:19:52 +03:00

30 lines
944 B
Objective-C

#import "TGBridgeStickerPack.h"
#import "TGBridgeDocumentMediaAttachment.h"
NSString *const TGBridgeStickerPackBuiltInKey = @"builtin";
NSString *const TGBridgeStickerPackTitleKey = @"title";
NSString *const TGBridgeStickerPackDocumentsKey = @"documents";
@implementation TGBridgeStickerPack
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
if (self != nil)
{
_builtIn = [aDecoder decodeBoolForKey:TGBridgeStickerPackBuiltInKey];
_title = [aDecoder decodeObjectForKey:TGBridgeStickerPackTitleKey];
_documents = [aDecoder decodeObjectForKey:TGBridgeStickerPackDocumentsKey];
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeBool:self.builtIn forKey:TGBridgeStickerPackBuiltInKey];
[aCoder encodeObject:self.title forKey:TGBridgeStickerPackTitleKey];
[aCoder encodeObject:self.documents forKey:TGBridgeStickerPackDocumentsKey];
}
@end