diff --git a/Classes/ChatConversationView.h b/Classes/ChatConversationView.h index 905855946..71b50bd43 100644 --- a/Classes/ChatConversationView.h +++ b/Classes/ChatConversationView.h @@ -36,7 +36,6 @@ OrderedDictionary *imageQualities; BOOL scrollOnGrowingEnabled; BOOL composingVisible; - BOOL isAppearing; } @property(nonatomic) LinphoneChatRoom *chatRoom; diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 36618eb72..70a8b1e7c 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -38,7 +38,6 @@ [NSNumber numberWithFloat:0.5], NSLocalizedString(@"Average", nil), [NSNumber numberWithFloat:0.0], NSLocalizedString(@"Minimum", nil), nil]; composingVisible = false; - isAppearing = false; } return self; } @@ -123,8 +122,6 @@ static UICompositeViewDescription *compositeDescription = nil; selector:@selector(callUpdateEvent:) name:kLinphoneCallUpdate object:nil]; - [self configureForRoom:false]; - isAppearing = true; } - (void)viewWillDisappear:(BOOL)animated { @@ -141,15 +138,12 @@ static UICompositeViewDescription *compositeDescription = nil; [NSNotificationCenter.defaultCenter removeObserver:self]; PhoneMainView.instance.currentRoom = NULL; - isAppearing = FALSE; } - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; composingVisible = !composingVisible; [self setComposingVisible:!composingVisible withDelay:0]; - if (!isAppearing) - return; //no need to do all that stuff if the view isn't yet appeared. // force offset recomputing [_messageField refreshHeight]; @@ -216,10 +210,6 @@ static UICompositeViewDescription *compositeDescription = nil; - (void)applicationWillEnterForeground:(NSNotification *)notif { if (_chatRoom != nil) { [ChatConversationView markAsRead:_chatRoom]; - TabBarView *tab = (TabBarView *)[PhoneMainView.instance.mainViewController - getCachedController:NSStringFromClass(TabBarView.class)]; - [tab update:YES]; - [PhoneMainView.instance updateApplicationBadgeNumber]; } } diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.m b/Classes/LinphoneUI/UIChatBubbleTextCell.m index 819252698..5e7279984 100644 --- a/Classes/LinphoneUI/UIChatBubbleTextCell.m +++ b/Classes/LinphoneUI/UIChatBubbleTextCell.m @@ -166,15 +166,7 @@ [_statusInProgressSpinner stopAnimating]; } - if (outgoing) { - [_messageText setAccessibilityLabel:@"Outgoing message"]; - } else { - [_messageText setAccessibilityLabel:@"Incoming message"]; - if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) { - [ChatConversationView markAsRead:VIEW(ChatConversationView).chatRoom]; - } - } - + [_messageText setAccessibilityLabel:outgoing ? @"Outgoing message" : @"Incoming message"]; if (outgoing && (state == LinphoneChatMessageStateDeliveredToUser || state == LinphoneChatMessageStateDisplayed || state == LinphoneChatMessageStateNotDelivered || state == LinphoneChatMessageStateFileTransferError)) {