1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-11 17:09:46 +01:00
Telegram/Telegraph/TGSharedMediaAvailabilityState.m

22 lines
582 B
Mathematica
Raw Normal View History

2015-10-01 18:19:52 +02:00
#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