mirror of
https://github.com/danog/Telegram.git
synced 2024-12-03 09:57:46 +01:00
22 lines
582 B
Objective-C
22 lines
582 B
Objective-C
#import "TGSharedMediaAvailabilityState.h"
|
|
|
|
@implementation TGSharedMediaAvailabilityState
|
|
|
|
- (instancetype)initWithType:(TGSharedMediaAvailabilityStateType)type progress:(CGFloat)progress
|
|
{
|
|
self = [super init];
|
|
if (self != nil)
|
|
{
|
|
_type = type;
|
|
_progress = progress;
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (BOOL)isEqual:(id)object
|
|
{
|
|
return [object isKindOfClass:[TGSharedMediaAvailabilityState class]] && _type == ((TGSharedMediaAvailabilityState *)object)->_type && ABS(_progress - ((TGSharedMediaAvailabilityState *)object)->_progress) < FLT_EPSILON;
|
|
}
|
|
|
|
@end
|