diff --git a/Classes/HistoryViewController.m b/Classes/HistoryViewController.m index 0f88429b7..683f076e5 100644 --- a/Classes/HistoryViewController.m +++ b/Classes/HistoryViewController.m @@ -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];