From 8baea8c6c5f738caec5bc0179f7450fabf4dd830 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Mon, 25 Mar 2019 15:28:53 +0100 Subject: [PATCH] use new message state FileTransferInProgress --- Classes/LinphoneUI/UIChatBubblePhotoCell.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneUI/UIChatBubblePhotoCell.m b/Classes/LinphoneUI/UIChatBubblePhotoCell.m index 284e828c9..66a183cd8 100644 --- a/Classes/LinphoneUI/UIChatBubblePhotoCell.m +++ b/Classes/LinphoneUI/UIChatBubblePhotoCell.m @@ -387,7 +387,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100; - (void)onFileTransferSendUpdate:(NSNotification *)notif { LinphoneChatMessageState state = [[[notif userInfo] objectForKey:@"state"] intValue]; - if (state == LinphoneChatMessageStateInProgress) { + if (state == LinphoneChatMessageStateInProgress || state == LinphoneChatMessageStateFileTransferInProgress) { float progress = [[[notif userInfo] objectForKey:@"progress"] floatValue]; // When uploading a file, the self.message file is first uploaded to the server, // so we are in progress state. Then state goes to filetransfertdone. Then, @@ -403,7 +403,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100; } - (void)onFileTransferRecvUpdate:(NSNotification *)notif { LinphoneChatMessageState state = [[[notif userInfo] objectForKey:@"state"] intValue]; - if (state == LinphoneChatMessageStateInProgress) { + if (state == LinphoneChatMessageStateInProgress || state == LinphoneChatMessageStateFileTransferInProgress) { float progress = [[[notif userInfo] objectForKey:@"progress"] floatValue]; _fileTransferProgress.progress = MAX(_fileTransferProgress.progress, progress); _fileTransferProgress.hidden = _cancelButton.hidden = (_fileTransferProgress.progress == 1.f);