diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m
index 91f811ff3..6cac282fa 100644
--- a/Classes/ChatConversationView.m
+++ b/Classes/ChatConversationView.m
@@ -163,6 +163,7 @@ static UICompositeViewDescription *compositeDescription = nil;
linphone_chat_room_cbs_set_chat_message_received(_chatRoomCbs, on_chat_room_chat_message_received);
linphone_chat_room_cbs_set_chat_message_sent(_chatRoomCbs, on_chat_room_chat_message_sent);
linphone_chat_room_cbs_set_is_composing_received(_chatRoomCbs, on_chat_room_is_composing_received);
+ linphone_chat_room_cbs_set_all_information_received(_chatRoomCbs, on_chat_room_all_information_received);
linphone_chat_room_cbs_set_user_data(_chatRoomCbs, (__bridge void*)self);
linphone_chat_room_add_callbacks(_chatRoom, _chatRoomCbs);
}
@@ -777,4 +778,9 @@ void on_chat_room_is_composing_received(LinphoneChatRoom *cr, const LinphoneAddr
[view setComposingVisible:composing withDelay:0.3];
}
+void on_chat_room_all_information_received(LinphoneChatRoom *cr) {
+ ChatConversationView *view = (__bridge ChatConversationView *)linphone_chat_room_cbs_get_user_data(linphone_chat_room_get_current_callbacks(cr));
+ [view configureForRoom:false];
+}
+
@end
diff --git a/Classes/ChatsListTableView.m b/Classes/ChatsListTableView.m
index ab767729e..5b76ae1ee 100644
--- a/Classes/ChatsListTableView.m
+++ b/Classes/ChatsListTableView.m
@@ -162,24 +162,13 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo
return;
LinphoneChatRoom *chatRoom = (LinphoneChatRoom *)bctbx_list_nth_data(_data, (int)[indexPath row]);
- ChatConversationView *view = VIEW(ChatConversationView);
- LinphoneChatRoom *oldRoom = view.chatRoom;
- if (oldRoom) {
- LinphoneChatRoomCbs *oldCbs = linphone_chat_room_get_current_callbacks(oldRoom);
- if (oldCbs && view.chatRoomCbs && oldCbs == view.chatRoomCbs) {
- linphone_chat_room_remove_callbacks(oldRoom, view.chatRoomCbs);
- view.chatRoomCbs = NULL;
- }
- }
+ [PhoneMainView.instance goToChatRoom:chatRoom];
- view.chatRoom = chatRoom;
// on iPad, force unread bubble to disappear by reloading the cell
if (IPAD) {
UIChatCell *cell = (UIChatCell *)[tableView cellForRowAtIndexPath:indexPath];
[cell updateUnreadBadge];
- [view configureForRoom:false];
}
- [PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
}
void deletion_chat_room_state_changed(LinphoneChatRoom *cr, LinphoneChatRoomState newState) {
diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m
index b9c0e2815..c2f2db77e 100644
--- a/Classes/LinphoneAppDelegate.m
+++ b/Classes/LinphoneAppDelegate.m
@@ -667,9 +667,7 @@ didInvalidatePushTokenForType:(NSString *)type {
LinphoneAddress *local = linphone_address_new(local_address.UTF8String);
LinphoneChatRoom *room = linphone_core_find_chat_room(LC, peer, local);
if (room) {
- ChatConversationView *view = VIEW(ChatConversationView);
- view.chatRoom = room;
- [PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
+ [PhoneMainView.instance goToChatRoom:room];
return;
}
[PhoneMainView.instance changeCurrentView:ChatsListView.compositeViewDescription];
diff --git a/Classes/LinphoneUI/StatusBarView.m b/Classes/LinphoneUI/StatusBarView.m
index bdccd0896..78a76e600 100644
--- a/Classes/LinphoneUI/StatusBarView.m
+++ b/Classes/LinphoneUI/StatusBarView.m
@@ -137,7 +137,7 @@
(linphone_content_get_buffer(content) == NULL)) {
return;
}
- uint8_t *bodyTmp = linphone_content_get_buffer(content);
+ const uint8_t *bodyTmp = linphone_content_get_buffer(content);
const char *body = (const char *)bodyTmp;
if ((body = strstr(body, "voice-message: ")) == NULL) {
LOGW(@"Received new NOTIFY from voice mail but could not find 'voice-message' in BODY. Ignoring it.");
diff --git a/Classes/PhoneMainView.h b/Classes/PhoneMainView.h
index 0fe47e070..710aaa97b 100644
--- a/Classes/PhoneMainView.h
+++ b/Classes/PhoneMainView.h
@@ -111,6 +111,7 @@
- (void)updateApplicationBadgeNumber;
- (void)getOrCreateOneToOneChatRoom:(const LinphoneAddress *)remoteAddress waitView:(UIView *)waitView;
- (void)createChatRoomWithSubject:(const char *)subject addresses:(bctbx_list_t *)addresses andWaitView:(UIView *)waitView;
+- (void)goToChatRoom:(LinphoneChatRoom *)cr;
+ (PhoneMainView*) instance;
- (BOOL)isIphoneXDevice;
diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m
index b1c789c4a..761eeab14 100644
--- a/Classes/PhoneMainView.m
+++ b/Classes/PhoneMainView.m
@@ -871,14 +871,13 @@ static RootViewManager *rootViewManagerInstance = nil;
bctbx_list_free(addresses);
return;
}
- ChatConversationView *view = VIEW(ChatConversationView);
- view.chatRoom = room;
- [self changeCurrentView:view.compositeViewDescription];
+
+ [self goToChatRoom:room];
}
- (void)createChatRoomWithSubject:(const char *)subject addresses:(bctbx_list_t *)addresses andWaitView:(UIView *)waitView {
if (!linphone_proxy_config_get_conference_factory_uri(linphone_core_get_default_proxy_config(LC))
- || ([[LinphoneManager instance] lpConfigBoolForKey:@"prefer_basic_chat_room" withDefault:FALSE] && bctbx_list_size(addresses) == 1)) {
+ || ([[LinphoneManager instance] lpConfigBoolForKey:@"prefer_basic_chat_room" inSection:@"misc"] && bctbx_list_size(addresses) == 1)) {
// If there's no factory uri, create a basic chat room
if (bctbx_list_size(addresses) != 1) {
// Display Error: unsuported group chat
@@ -918,7 +917,15 @@ static RootViewManager *rootViewManagerInstance = nil;
_waitView.hidden = YES;
_waitView = NULL;
ChatConversationView *view = VIEW(ChatConversationView);
+ if (view.chatRoom && view.chatRoomCbs)
+ linphone_chat_room_remove_callbacks(view.chatRoom, view.chatRoomCbs);
+
+ if (PhoneMainView.instance.currentView == view.compositeViewDescription)
+ [PhoneMainView.instance popCurrentView];
+
+ view.chatRoomCbs = NULL;
view.chatRoom = cr;
+ self.currentRoom = view.chatRoom;
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
}
diff --git a/Classes/Utils/FileTransferDelegate.m b/Classes/Utils/FileTransferDelegate.m
index 87470abd7..c37782c24 100644
--- a/Classes/Utils/FileTransferDelegate.m
+++ b/Classes/Utils/FileTransferDelegate.m
@@ -38,12 +38,12 @@ static void linphone_iphone_file_transfer_recv(LinphoneChatMessage *message, con
size_t size = linphone_buffer_get_size(buffer);
if (!thiz.data) {
- thiz.data = [[NSMutableData alloc] initWithCapacity:linphone_content_get_size(content)];
+ thiz.data = [[NSMutableData alloc] initWithCapacity:linphone_content_get_file_size(content)];
}
if (size == 0) {
LOGI(@"Transfer of %s (%d bytes): download finished", linphone_content_get_name(content), size);
- assert([thiz.data length] == linphone_content_get_size(content));
+ assert([thiz.data length] == linphone_content_get_file_size(content));
// we're finished, save the image and update the message
UIImage *image = [UIImage imageWithData:thiz.data];
@@ -63,6 +63,7 @@ static void linphone_iphone_file_transfer_recv(LinphoneChatMessage *message, con
[errView addAction:defaultAction];
[PhoneMainView.instance presentViewController:errView animated:YES completion:nil];
+ [thiz stopAndDestroy];
return;
}
@@ -97,7 +98,6 @@ static void linphone_iphone_file_transfer_recv(LinphoneChatMessage *message, con
forKey:@"localimage"
inMessage:message];
}
- thiz.message = NULL;
[NSNotificationCenter.defaultCenter
postNotificationName:kLinphoneFileTransferRecvUpdate
object:thiz
@@ -114,14 +114,14 @@ static void linphone_iphone_file_transfer_recv(LinphoneChatMessage *message, con
}];
} else {
LOGD(@"Transfer of %s (%d bytes): already %ld sent, adding %ld", linphone_content_get_name(content),
- linphone_content_get_size(content), [thiz.data length], size);
+ linphone_content_get_file_size(content), [thiz.data length], size);
[thiz.data appendBytes:linphone_buffer_get_string_content(buffer) length:size];
[NSNotificationCenter.defaultCenter
postNotificationName:kLinphoneFileTransferRecvUpdate
object:thiz
userInfo:@{
@"state" : @(linphone_chat_message_get_state(message)),
- @"progress" : @([thiz.data length] * 1.f / linphone_content_get_size(content)),
+ @"progress" : @([thiz.data length] * 1.f / linphone_content_get_file_size(content)),
}];
}
}
diff --git a/linphone-Info.plist b/linphone-Info.plist
index 57208645b..160233698 100644
--- a/linphone-Info.plist
+++ b/linphone-Info.plist
@@ -24,7 +24,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.99.3
+ 3.99.4
CFBundleURLTypes
diff --git a/submodules/bctoolbox b/submodules/bctoolbox
index e34db6796..7df8b5ca0 160000
--- a/submodules/bctoolbox
+++ b/submodules/bctoolbox
@@ -1 +1 @@
-Subproject commit e34db6796ade971615d4b572bda87d9f699ea497
+Subproject commit 7df8b5ca085010ec35103414ed9582412aaff97d
diff --git a/submodules/belcard b/submodules/belcard
index b9e1951be..7376c8ba9 160000
--- a/submodules/belcard
+++ b/submodules/belcard
@@ -1 +1 @@
-Subproject commit b9e1951be4575c62e326d761a7f7c79c5cce9cb9
+Subproject commit 7376c8ba975617c8b2a7232c3acc428513a4ae8f
diff --git a/submodules/belle-sip b/submodules/belle-sip
index 2d4085354..cbb4ab4c2 160000
--- a/submodules/belle-sip
+++ b/submodules/belle-sip
@@ -1 +1 @@
-Subproject commit 2d4085354443598d59d43168e16e47e4d34e0ca3
+Subproject commit cbb4ab4c2a58e4fa1954043f6b17266e1685c887
diff --git a/submodules/linphone b/submodules/linphone
index 45bbb54ed..0041defd0 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit 45bbb54eda3d9c9abf9d9029f44ee17e926ed706
+Subproject commit 0041defd0085c928e6e9dd659f1eae015254cb04
diff --git a/submodules/mediastreamer2 b/submodules/mediastreamer2
index f49b3d5ea..ad4cdb240 160000
--- a/submodules/mediastreamer2
+++ b/submodules/mediastreamer2
@@ -1 +1 @@
-Subproject commit f49b3d5ea3ab56b4b021a760a58f44015b3c5765
+Subproject commit ad4cdb240e553654f87438fb4519754e90d1773d
diff --git a/submodules/ortp b/submodules/ortp
index 8fff73b5b..1fcd6fd15 160000
--- a/submodules/ortp
+++ b/submodules/ortp
@@ -1 +1 @@
-Subproject commit 8fff73b5b56f1cbf6fcca10068cc0f401d024420
+Subproject commit 1fcd6fd1558f26255ae9dac687191ddf988bfd5b