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

42 lines
1002 B
Mathematica
Raw Normal View History

2016-02-25 01:03:51 +01:00
#import "TGInternalGifSearchResultGalleryItem.h"
#import "TGInternalGifSearchResult+TGMediaItem.h"
#import "TGInternalGifSearchResultGalleryItemView.h"
@implementation TGInternalGifSearchResultGalleryItem
@synthesize selectionContext;
- (instancetype)initWithSearchResult:(TGInternalGifSearchResult *)searchResult
{
self = [super init];
if (self != nil)
{
_webSearchResult = searchResult;
}
return self;
}
- (id<TGMediaSelectableItem>)selectableMediaItem
{
return self.webSearchResult;
}
- (NSString *)uniqueId
{
return [[NSString alloc] initWithFormat:@"TGInternalGifSearchResultGalleryItem_%lld", (long long)_webSearchResult.document.documentId];
}
- (Class)viewClass
{
return [TGInternalGifSearchResultGalleryItemView class];
}
- (BOOL)isEqual:(id)object
{
return [object isKindOfClass:[TGInternalGifSearchResultGalleryItem class]] && TGObjectCompare(_webSearchResult, ((TGInternalGifSearchResultGalleryItem *)object)->_webSearchResult);
}
@end