1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 09:27:55 +01:00
Telegram/Telegraph/TGWebSearchInternalGifItem.m
2016-02-25 01:03:51 +01:00

42 lines
855 B
Objective-C

#import "TGWebSearchInternalGifItem.h"
#import "TGWebSearchInternalGifItemView.h"
#import "TGWebSearchInternalGifResult+TGMediaItem.h"
@implementation TGWebSearchInternalGifItem
@synthesize selectionContext;
- (instancetype)initWithSearchResult:(TGWebSearchInternalGifResult *)searchResult
{
self = [super init];
if (self != nil)
{
_webSearchResult = searchResult;
}
return self;
}
- (instancetype)copyWithZone:(NSZone *)__unused zone
{
return self;
}
- (id<TGMediaSelectableItem>)selectableMediaItem
{
return self.webSearchResult;
}
- (Class)viewClass
{
return [TGWebSearchInternalGifItemView class];
}
- (BOOL)isEqual:(id)object
{
return [object isKindOfClass:[TGWebSearchInternalGifItem class]] && TGObjectCompare(_webSearchResult, ((TGWebSearchInternalGifItem *)object)->_webSearchResult);
}
@end