From b8f9ac4c234c199cf31ef9b8f243bc5eb280081f Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 21 Aug 2012 14:50:53 +0200 Subject: [PATCH] Fix history filter issue --- Classes/HistoryTableViewController.m | 6 +++--- Classes/HistoryViewController.m | 27 ++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Classes/HistoryTableViewController.m b/Classes/HistoryTableViewController.m index b14825271..a39ccaea2 100644 --- a/Classes/HistoryTableViewController.m +++ b/Classes/HistoryTableViewController.m @@ -60,8 +60,8 @@ #pragma mark - ViewController Functions -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; [self loadData]; } @@ -74,7 +74,6 @@ } missedFilter = amissedFilter; [self loadData]; - [[self tableView] reloadData]; } @@ -94,6 +93,7 @@ } logs = ms_list_next(logs); } + [[self tableView] reloadData]; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { diff --git a/Classes/HistoryViewController.m b/Classes/HistoryViewController.m index 11f4f951a..bb37c1108 100644 --- a/Classes/HistoryViewController.m +++ b/Classes/HistoryViewController.m @@ -76,11 +76,15 @@ static UICompositeViewDescription *compositeDescription = nil; - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + + if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) { + [tableController viewWillAppear:animated]; + } + if([tableController isEditing]) [tableController setEditing:FALSE animated:FALSE]; [editButton setOff]; [self changeView: History_All]; - [self.tableView reloadData]; // Reset missed call linphone_core_reset_missed_calls_count([LinphoneManager getLc]); @@ -88,6 +92,27 @@ static UICompositeViewDescription *compositeDescription = nil; [[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneCallUpdate object:self]; } +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) { + [tableController viewDidAppear:animated]; + } +} + +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; + if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) { + [tableController viewDidDisappear:animated]; + } +} + +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; + if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) { + [tableController viewWillDisappear:animated]; + } +} + - (void)viewDidLoad { [super viewDidLoad]; [self changeView: History_All];