1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-04 18:37:47 +01:00
Telegram/Telegraph/TGWebSearchInternalGifItem.m

44 lines
1.3 KiB
Mathematica
Raw Normal View History

2015-10-01 18:19:52 +02:00
#import "TGWebSearchInternalGifItem.h"
#import "TGWebSearchInternalGifItemView.h"
@implementation TGWebSearchInternalGifItem
- (instancetype)initWithSearchResult:(TGWebSearchInternalGifResult *)searchResult isEditing:(bool (^)())isEditing toggleEditing:(void (^)())toggleEditing itemSelected:(void (^)(id<TGWebSearchListItem>))itemSelected isItemSelected:(bool (^)(id<TGWebSearchListItem>))isItemSelected isItemHidden:(bool (^)(id<TGWebSearchListItem>))isItemHidden
{
self = [super init];
if (self != nil)
{
_webSearchResult = searchResult;
_isEditing = [isEditing copy];
_toggleEditing = [toggleEditing copy];
_itemSelected = [itemSelected copy];
_isItemSelected = [isItemSelected copy];
_isItemHidden = [isItemHidden copy];
}
return self;
}
- (NSString *)uniqueId
{
return [[NSString alloc] initWithFormat:@"TGWebSearchInternalGifItem_%lld", (long long)_webSearchResult.documentId];
}
- (instancetype)copyWithZone:(NSZone *)__unused zone
{
return self;
}
- (Class)viewClass
{
return [TGWebSearchInternalGifItemView class];
}
- (BOOL)isEqual:(id)object
{
return [object isKindOfClass:[TGWebSearchInternalGifItem class]] && TGObjectCompare(_webSearchResult, ((TGWebSearchInternalGifItem *)object)->_webSearchResult);
}
@end