mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Build ChatListUI
This commit is contained in:
41
submodules/LegacyComponents/Sources/TGMessageEntityPre.m
Normal file
41
submodules/LegacyComponents/Sources/TGMessageEntityPre.m
Normal file
@@ -0,0 +1,41 @@
|
||||
#import "TGMessageEntityPre.h"
|
||||
|
||||
#import "PSKeyValueCoder.h"
|
||||
|
||||
@implementation TGMessageEntityPre
|
||||
|
||||
- (instancetype)initWithRange:(NSRange)range language:(NSString *)language {
|
||||
self = [super initWithRange:range];
|
||||
if (self != nil) {
|
||||
_language = language;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithKeyValueCoder:(PSKeyValueCoder *)coder {
|
||||
self = [super initWithKeyValueCoder:coder];
|
||||
if (self != nil) {
|
||||
_language = [coder decodeStringForCKey:"language"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithKeyValueCoder:(PSKeyValueCoder *)coder {
|
||||
[super encodeWithKeyValueCoder:coder];
|
||||
[coder encodeString:_language forCKey:"language"];
|
||||
}
|
||||
|
||||
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if (self != nil) {
|
||||
_language = [aDecoder decodeObjectForKey:@"language"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(NSCoder *)aCoder {
|
||||
[super encodeWithCoder:aCoder];
|
||||
[aCoder encodeObject:_language forKey:@"language"];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user