mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Fix crash when coming back from background when LinphoneCore has been destroyed
This commit is contained in:
parent
cc60cb6389
commit
78807b9e1a
1 changed files with 13 additions and 11 deletions
|
|
@ -1868,17 +1868,19 @@ static void audioRouteChangeListenerCallback (
|
|||
}
|
||||
|
||||
+ (int)unreadMessageCount {
|
||||
int count = 0;
|
||||
MSList* rooms = linphone_core_get_chat_rooms([LinphoneManager getLc]);
|
||||
MSList* item = rooms;
|
||||
while (item) {
|
||||
LinphoneChatRoom* room = (LinphoneChatRoom*)item->data;
|
||||
if( room ){
|
||||
count += linphone_chat_room_get_unread_messages_count(room);
|
||||
}
|
||||
item = item->next;
|
||||
}
|
||||
return count;
|
||||
int count = 0;
|
||||
if( [LinphoneManager isLcReady] ){
|
||||
MSList* rooms = linphone_core_get_chat_rooms([LinphoneManager getLc]);
|
||||
MSList* item = rooms;
|
||||
while (item) {
|
||||
LinphoneChatRoom* room = (LinphoneChatRoom*)item->data;
|
||||
if( room ){
|
||||
count += linphone_chat_room_get_unread_messages_count(room);
|
||||
}
|
||||
item = item->next;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
+ (BOOL)copyFile:(NSString*)src destination:(NSString*)dst override:(BOOL)override {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue