1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-03 09:57:46 +01:00
Telegram/Telegraph/TGSharedMediaAvailabilityState.m
2015-10-01 19:19:52 +03:00

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