mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-24 11:56:18 +02:00
4647310322
Based on Swiftgram 12.5 (Telegram iOS 12.5). All GLEGram features ported and organized in GLEGram/ folder. Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass, Font Replacement, Fake Profile, Chat Export, Plugin System, and more. See CHANGELOG_12.5.md for full details.
47 lines
1016 B
Objective-C
47 lines
1016 B
Objective-C
#import <LegacyComponents/TGMessageEntityTextUrl.h>
|
|
|
|
#import <LegacyComponents/PSKeyValueCoder.h>
|
|
|
|
@implementation TGMessageEntityTextUrl
|
|
|
|
- (instancetype)initWithRange:(NSRange)range url:(NSString *)url
|
|
{
|
|
self = [super initWithRange:range];
|
|
if (self != nil)
|
|
{
|
|
_url = url;
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (instancetype)initWithKeyValueCoder:(PSKeyValueCoder *)coder
|
|
{
|
|
self = [super initWithKeyValueCoder:coder];
|
|
if (self != nil)
|
|
{
|
|
_url = [coder decodeStringForCKey:"url"];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)encodeWithKeyValueCoder:(PSKeyValueCoder *)coder
|
|
{
|
|
[super encodeWithKeyValueCoder:coder];
|
|
[coder encodeString:_url forCKey:"url"];
|
|
}
|
|
|
|
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
|
|
self = [super initWithCoder:aDecoder];
|
|
if (self != nil) {
|
|
_url = [aDecoder decodeObjectForKey:@"url"];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)encodeWithCoder:(NSCoder *)aCoder {
|
|
[super encodeWithCoder:aCoder];
|
|
[aCoder encodeObject:_url forKey:@"url"];
|
|
}
|
|
|
|
@end
|