forked from mirrors/linphone-iphone
enhance previous commit
This commit is contained in:
parent
f9cafc8330
commit
2cc0e29e50
4 changed files with 9 additions and 10 deletions
|
|
@ -104,9 +104,9 @@
|
|||
}
|
||||
|
||||
- (void)scrollToLastUnread:(BOOL)animated {
|
||||
if (eventList == nil || _chatRoom == nil) {
|
||||
if (eventList == nil || _chatRoom == nil)
|
||||
return;
|
||||
}
|
||||
|
||||
int index = -1;
|
||||
size_t count = bctbx_list_size(eventList);
|
||||
// Find first unread & set all entry read
|
||||
|
|
|
|||
|
|
@ -761,9 +761,6 @@ void on_chat_room_chat_message_received(LinphoneChatRoom *cr, const LinphoneEven
|
|||
if (!chat)
|
||||
return;
|
||||
|
||||
if (linphone_chat_message_is_outgoing(chat))
|
||||
return;
|
||||
|
||||
const LinphoneAddress *from = linphone_chat_message_get_from_address(chat);
|
||||
if (!from)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1112,9 +1112,6 @@ static void linphone_iphone_popup_password_request(LinphoneCore *lc, LinphoneAut
|
|||
pushBgTaskMsg = 0;
|
||||
}
|
||||
|
||||
if (linphone_chat_message_is_outgoing(msg))
|
||||
return;
|
||||
|
||||
if (!linphone_chat_message_is_file_transfer(msg) && !linphone_chat_message_is_text(msg))
|
||||
return;
|
||||
|
||||
|
|
@ -1128,6 +1125,9 @@ static void linphone_iphone_popup_password_request(LinphoneCore *lc, LinphoneAut
|
|||
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneMessageReceived object:self userInfo:dict];
|
||||
|
||||
if (linphone_chat_message_is_outgoing(msg))
|
||||
return;
|
||||
|
||||
if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -287,9 +287,11 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
LinphoneChatMessage *msg = [[notif.userInfo objectForKey:@"message"] pointerValue];
|
||||
NSString *callID = [notif.userInfo objectForKey:@"call-id"];
|
||||
[self updateApplicationBadgeNumber];
|
||||
LinphoneChatRoom *room = msg ? linphone_chat_message_get_chat_room(msg) : NULL;
|
||||
|
||||
if (!room)
|
||||
if (!msg)
|
||||
return;
|
||||
|
||||
if (linphone_chat_message_is_outgoing(msg))
|
||||
return;
|
||||
|
||||
ChatConversationView *view = VIEW(ChatConversationView);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue