mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-25 12:26:55 +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.
42 lines
1.0 KiB
Objective-C
42 lines
1.0 KiB
Objective-C
#import <LegacyComponents/TGMessageEntityMentionName.h>
|
|
|
|
#import <LegacyComponents/PSKeyValueCoder.h>
|
|
|
|
@implementation TGMessageEntityMentionName
|
|
|
|
- (instancetype)initWithRange:(NSRange)range userId:(int32_t)userId {
|
|
self = [super initWithRange:range];
|
|
if (self != nil) {
|
|
_userId = userId;
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (instancetype)initWithKeyValueCoder:(PSKeyValueCoder *)coder {
|
|
self = [super initWithKeyValueCoder:coder];
|
|
if (self != nil) {
|
|
_userId = [coder decodeInt32ForCKey:"userId"];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)encodeWithKeyValueCoder:(PSKeyValueCoder *)coder {
|
|
[super encodeWithKeyValueCoder:coder];
|
|
[coder encodeInt32:_userId forCKey:"userId"];
|
|
}
|
|
|
|
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
|
|
self = [super initWithCoder:aDecoder];
|
|
if (self != nil) {
|
|
_userId = [aDecoder decodeInt32ForKey:@"userId"];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)encodeWithCoder:(NSCoder *)aCoder {
|
|
[super encodeWithCoder:aCoder];
|
|
[aCoder encodeInt32:_userId forKey:@"userId"];
|
|
}
|
|
|
|
@end
|