From 515a4a550b693347f80d927fca63921858ff76ea Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Thu, 22 May 2014 16:36:19 +0200 Subject: [PATCH] Better fix for empty chat list after attaching picture --- Classes/ChatRoomTableViewController.m | 4 ++-- Classes/ChatRoomViewController.m | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Classes/ChatRoomTableViewController.m b/Classes/ChatRoomTableViewController.m index 3969d097f..323c6943a 100644 --- a/Classes/ChatRoomTableViewController.m +++ b/Classes/ChatRoomTableViewController.m @@ -43,8 +43,8 @@ - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; [TUNinePatchCache flushCache]; // Clear cache - [self clearMessageList]; - chatRoom = NULL; +// [self clearMessageList]; +// chatRoom = NULL; } - (void)viewWillAppear:(BOOL)animated { [self reloadData]; diff --git a/Classes/ChatRoomViewController.m b/Classes/ChatRoomViewController.m index 8753413d9..2ba4e351f 100644 --- a/Classes/ChatRoomViewController.m +++ b/Classes/ChatRoomViewController.m @@ -197,8 +197,6 @@ static UICompositeViewDescription *compositeDescription = nil; [messageField resignFirstResponder]; - chatRoom = NULL; - [self setComposingVisible:FALSE withDelay:0]; // will hide the "user is composing.." message [[NSNotificationCenter defaultCenter] removeObserver:self @@ -521,6 +519,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta #pragma mark - Action Functions - (IBAction)onBackClick:(id)event { + [self.tableController setChatRoom:NULL]; [[PhoneMainView instance] popCurrentView]; } @@ -657,7 +656,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta [errorAlert show]; [errorAlert release]; } else { - [LinphoneLogger log:LinphoneLoggerError format:@"Cannot dowanlod file from [%@] because [%@]", url, [error localizedDescription]]; + [LinphoneLogger log:LinphoneLoggerError format:@"Cannot download file from [%@] because [%@]", url, [error localizedDescription]]; UIAlertView* errorAlert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Transfer error", nil) message:NSLocalizedString(@"Cannot transfer file from remote contact", nil) delegate:nil