mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix image sending, there is still an issue with the message state. Not sure why.
This commit is contained in:
parent
041ab29d08
commit
42199f23dc
2 changed files with 7 additions and 6 deletions
|
|
@ -43,8 +43,6 @@
|
|||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
[TUNinePatchCache flushCache]; // Clear cache
|
||||
[self clearMessageList];
|
||||
chatRoom = NULL;
|
||||
}
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[self reloadData];
|
||||
|
|
@ -110,7 +108,10 @@
|
|||
int count = 0;
|
||||
while (item) {
|
||||
LinphoneChatMessage* msg = (LinphoneChatMessage*)item->data;
|
||||
NSLog(@"Message %d: %s", count++, linphone_chat_message_get_text(msg));
|
||||
const char* text = linphone_chat_message_get_text(msg);
|
||||
const char* url = linphone_chat_message_get_external_body_url(msg);
|
||||
const char* state = linphone_chat_message_state_to_string(linphone_chat_message_get_state(msg));
|
||||
NSLog(@"Message %d type %s (%s): %s", count++, text?"TEXT":"IMG", state,text?text:url);
|
||||
item = item->next;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
[messageField resignFirstResponder];
|
||||
|
||||
chatRoom = NULL;
|
||||
//chatRoom = NULL;
|
||||
|
||||
[self setComposingVisible:FALSE withDelay:0]; // will hide the "user is composing.." message
|
||||
|
||||
|
|
@ -250,7 +250,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[self update];
|
||||
linphone_chat_room_mark_as_read(chatRoom);
|
||||
[self setComposingVisible:linphone_chat_room_is_remote_composing(chatRoom) withDelay:0];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneTextReceived object:self];
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(NSNotification*)notif {
|
||||
|
|
@ -307,8 +306,9 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState state,void* ud) {
|
||||
ChatRoomViewController* thiz = (ChatRoomViewController*)ud;
|
||||
const char*text = linphone_chat_message_get_text(msg);
|
||||
const char*url = linphone_chat_message_get_external_body_url(msg);
|
||||
[LinphoneLogger log:LinphoneLoggerLog
|
||||
format:@"Delivery status for [%s] is [%s]",text,linphone_chat_message_state_to_string(state)];
|
||||
format:@"Delivery status for %p [%s] is [%s]",msg, text?text:url,linphone_chat_message_state_to_string(state)];
|
||||
[thiz.tableController updateChatEntry:msg];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue