mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
31 lines
529 B
Objective-C
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
|