forked from mirrors/linphone-iphone
use new message state FileTransferInProgress
This commit is contained in:
parent
86f6e73283
commit
8baea8c6c5
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue