forked from mirrors/linphone-iphone
Allow UICallCellData to be initialized with a minimized/maximized state.
This fixes the problem of incoming call information being displayed in fullscreen.
This commit is contained in:
parent
db11e9de8d
commit
3447642258
4 changed files with 10 additions and 4 deletions
|
|
@ -26,6 +26,7 @@
|
|||
@interface InCallTableViewController : UITableViewController {
|
||||
@private
|
||||
NSTimer *updateTime;
|
||||
BOOL minimized;
|
||||
}
|
||||
|
||||
- (void)minimizeAll;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ enum TableSection {
|
|||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)initInCallTableViewController {
|
||||
minimized = false;
|
||||
}
|
||||
|
||||
- (id)init{
|
||||
|
|
@ -147,7 +148,7 @@ enum TableSection {
|
|||
if(appData != NULL) {
|
||||
data = [appData->userInfos objectForKey:kLinphoneInCallCellData];
|
||||
if(data == nil) {
|
||||
data = [[[UICallCellData alloc] init:call] autorelease];
|
||||
data = [[[UICallCellData alloc] init:call minimized:minimized] autorelease];
|
||||
[appData->userInfos setObject:data forKey:kLinphoneInCallCellData];
|
||||
}
|
||||
}
|
||||
|
|
@ -179,11 +180,14 @@ enum TableSection {
|
|||
}
|
||||
|
||||
- (void)minimizeAll {
|
||||
|
||||
const MSList *list = linphone_core_get_calls([LinphoneManager getLc]);
|
||||
minimized = true;
|
||||
while(list != NULL) {
|
||||
UICallCellData *data = [self getCallData:(LinphoneCall*)list->data];
|
||||
if(data) {
|
||||
data->minimize = true;
|
||||
} else {
|
||||
}
|
||||
list = list->next;
|
||||
}
|
||||
|
|
@ -192,6 +196,7 @@ enum TableSection {
|
|||
|
||||
- (void)maximizeAll {
|
||||
const MSList *list = linphone_core_get_calls([LinphoneManager getLc]);
|
||||
minimized = false;
|
||||
while(list != NULL) {
|
||||
UICallCellData *data = [self getCallData:(LinphoneCall*)list->data];
|
||||
if(data) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ typedef enum _UICallCellOtherView {
|
|||
LinphoneCall *call;
|
||||
}
|
||||
|
||||
- (id)init:(LinphoneCall*) call;
|
||||
- (id)init:(LinphoneCall*) call minimized:(BOOL)minimized;
|
||||
|
||||
@property (nonatomic, retain) UIImage *image;
|
||||
@property (nonatomic, retain) NSString *address;
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@
|
|||
@synthesize address;
|
||||
@synthesize image;
|
||||
|
||||
- (id)init:(LinphoneCall*) acall {
|
||||
- (id)init:(LinphoneCall*)acall minimized:(BOOL)minimized{
|
||||
self = [super init];
|
||||
if(self != nil) {
|
||||
self->minimize = false;
|
||||
self->minimize = minimized;
|
||||
self->view = UICallCellOtherView_Avatar;
|
||||
self->call = acall;
|
||||
image = [[UIImage imageNamed:@"avatar_unknown.png"] retain];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue