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

39 lines
797 B
Objective-C

#import "TGBridgeChatListSubscription.h"
NSString *const TGBridgeChatListSubscriptionName = @"chats.chatList";
NSString *const TGBridgeChatListSubscriptionLimitKey = @"limit";
@implementation TGBridgeChatListSubscription
- (instancetype)initWithLimit:(int32_t)limit
{
self = [super init];
if (self != nil)
{
_limit = limit;
}
return self;
}
- (bool)dropPreviouslyQueued
{
return true;
}
- (void)_serializeParametersWithCoder:(NSCoder *)aCoder
{
[aCoder encodeInt32:self.limit forKey:TGBridgeChatListSubscriptionLimitKey];
}
- (void)_unserializeParametersWithCoder:(NSCoder *)aDecoder
{
_limit = [aDecoder decodeInt32ForKey:TGBridgeChatListSubscriptionLimitKey];
}
+ (NSString *)subscriptionName
{
return TGBridgeChatListSubscriptionName;
}
@end