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

40 lines
1.0 KiB
Objective-C

#import "TGWebSearchResultsGalleryInternalGifItem.h"
#import "TGWebSearchInternalGifResult+TGMediaItem.h"
#import "TGWebSearchResultsGalleryInternalGifItemView.h"
@implementation TGWebSearchResultsGalleryInternalGifItem
@synthesize selectionContext;
- (instancetype)initWithSearchResult:(TGWebSearchInternalGifResult *)searchResult
{
self = [super init];
if (self != nil)
{
_webSearchResult = searchResult;
}
return self;
}
- (id<TGMediaSelectableItem>)selectableMediaItem
{
return self.webSearchResult;
}
- (NSString *)uniqueId
{
return [[NSString alloc] initWithFormat:@"TGWebSearchResultsGalleryInternalGifItem_%lld", (long long)_webSearchResult.documentId];
}
- (Class)viewClass
{
return [TGWebSearchResultsGalleryInternalGifItemView class];
}
- (BOOL)isEqual:(id)object
{
return [object isKindOfClass:[TGWebSearchResultsGalleryInternalGifItem class]] && TGObjectCompare(_webSearchResult, ((TGWebSearchResultsGalleryInternalGifItem *)object)->_webSearchResult);
}
@end