mirror of
https://github.com/danog/Telegram.git
synced 2024-12-02 09:27:55 +01:00
28 lines
641 B
Objective-C
28 lines
641 B
Objective-C
#import "TGLinkPreviewsContentProperty.h"
|
|
|
|
#import "PSKeyValueCoder.h"
|
|
|
|
@implementation TGLinkPreviewsContentProperty
|
|
|
|
- (instancetype)initWithDisableLinkPreviews:(bool)disableLinkPreviews
|
|
{
|
|
self = [super init];
|
|
if (self != nil)
|
|
{
|
|
_disableLinkPreviews = disableLinkPreviews;
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (instancetype)initWithKeyValueCoder:(PSKeyValueCoder *)coder
|
|
{
|
|
return [self initWithDisableLinkPreviews:[coder decodeInt32ForCKey:"disableLinkPreviews"] != 0];
|
|
}
|
|
|
|
- (void)encodeWithKeyValueCoder:(PSKeyValueCoder *)coder
|
|
{
|
|
[coder encodeInt32:_disableLinkPreviews ? 1 : 0 forCKey:"disableLinkPreviews"];
|
|
}
|
|
|
|
@end
|