1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-11 08:59:48 +01:00
Telegram/Watch/Extension/TGChatTimestamp.m
2016-02-25 01:03:51 +01:00

31 lines
529 B
Objective-C

#import "TGChatTimestamp.h"
@interface TGChatTimestamp ()
{
NSString *_cachedIdentifier;
}
@end
@implementation TGChatTimestamp
- (instancetype)initWithDate:(NSTimeInterval)date string:(NSString *)string
{
self = [super init];
if (self != nil)
{
_date = date;
_string = string;
}
return self;
}
- (NSString *)uniqueIdentifier
{
if (_cachedIdentifier == nil)
_cachedIdentifier = [NSString stringWithFormat:@"ts-%ld", (long)_date];
return _cachedIdentifier;
}
@end