Fix Callcell

This commit is contained in:
Yann Diorcet 2012-07-18 15:46:26 +02:00
parent ddfe400b81
commit da2dbcb36b
2 changed files with 17 additions and 7 deletions

View file

@ -54,7 +54,7 @@
UICallCellData *data;
}
@property (retain) UICallCellData *data;
@property (nonatomic, retain) UICallCellData *data;
@property (nonatomic, retain) IBOutlet UIImageView* headerBackgroundImage;
@property (nonatomic, retain) IBOutlet UIImageView* headerBackgroundHighlightImage;

View file

@ -84,6 +84,7 @@
[stateImage release];
[avatarImage release];
[headerView release];
[data release];
[super dealloc];
}
@ -92,10 +93,23 @@
[super prepareForReuse];
self->currentCall = FALSE;
[headerBackgroundHighlightImage setAlpha:0.0f];
[data release];
data = nil;
}
#pragma mark - Properties Functions
- (void)setData:(UICallCellData *)adata {
if(data !=nil) {
[data release];
data = nil;
}
if(adata !=nil) {
data = [adata retain];
}
[self update];
}
- (void)setCurrentCall:(BOOL) val {
BOOL oldVal = currentCall;
currentCall = val;
@ -108,6 +122,7 @@
}
}
#pragma mark - Static Functions
+ (int)getMaximizedHeight {
@ -141,13 +156,8 @@
#pragma mark -
- (void)update:(UICallCellData*) adata {
self->data = adata;
[self update];
}
- (void)update {
if(data == nil || data->call) {
if(data == nil || data->call == NULL) {
[LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot update call cell: null call or data"];
return;
}