mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Hide edit button in history view if it is empty
This commit is contained in:
parent
b076a58a3a
commit
1b57057d2d
1 changed files with 7 additions and 2 deletions
|
|
@ -88,8 +88,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
[deleteButton setHidden:TRUE];
|
||||
[editButton setOff];
|
||||
[self changeView: History_All];
|
||||
|
||||
[self changeView: History_All];
|
||||
|
||||
// Reset missed call
|
||||
linphone_core_reset_missed_calls_count([LinphoneManager getLc]);
|
||||
// Fake event
|
||||
|
|
@ -98,6 +98,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
editButton.hidden = ([[tableView dataSource] tableView:tableView numberOfRowsInSection:0] == 0);
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewDidAppear:animated];
|
||||
}
|
||||
|
|
@ -160,6 +162,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
} else {
|
||||
missedButton.selected = FALSE;
|
||||
}
|
||||
|
||||
editButton.hidden = ([[tableView dataSource] tableView:tableView numberOfRowsInSection:0] == 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -181,6 +185,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
- (IBAction)onDeleteClick:(id) event {
|
||||
linphone_core_clear_call_logs([LinphoneManager getLc]);
|
||||
[tableController loadData];
|
||||
editButton.hidden = ([[tableView dataSource] tableView:tableView numberOfRowsInSection:0] == 0);
|
||||
if([editButton isSelected]) {
|
||||
[editButton toggle];
|
||||
[self onEditClick:nil];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue