mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
Fix Callcell
This commit is contained in:
parent
ddfe400b81
commit
da2dbcb36b
2 changed files with 17 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue