session-ios/Signal/src/ViewControllers/ConversationView/Cells/ConversationViewCell.m
2017-11-20 16:51:58 -05:00

44 lines
812 B
Objective-C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "ConversationViewCell.h"
#import "ConversationViewItem.h"
NS_ASSUME_NONNULL_BEGIN
@implementation ConversationViewCell
- (void)prepareForReuse
{
[super prepareForReuse];
self.viewItem = nil;
self.delegate = nil;
self.isCellVisible = NO;
self.contentWidth = 0;
}
- (void)loadForDisplay
{
OWSFail(@"%@ This method should be overridden.", self.logTag);
}
- (CGSize)cellSizeForViewWidth:(int)viewWidth contentWidth:(int)contentWidth
{
OWSFail(@"%@ This method should be overridden.", self.logTag);
return CGSizeZero;
}
- (void)setIsCellVisible:(BOOL)isCellVisible
{
_isCellVisible = isCellVisible;
if (isCellVisible) {
[self layoutIfNeeded];
}
}
@end
NS_ASSUME_NONNULL_END