mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
[Imdm] remover listener cleaning on delivered
This commit is contained in:
parent
2e6d2b8297
commit
f74e37becf
1 changed files with 2 additions and 2 deletions
|
|
@ -4560,7 +4560,7 @@ static void message_state_changed(LinphoneChatMessage* msg, LinphoneChatMessageS
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
env->CallVoidMethod(listener, method, jmessage, env->CallStaticObjectMethod(ljb->chatMessageStateClass, ljb->chatMessageStateFromIntId, (jint)state));
|
||||
|
||||
if (state == LinphoneChatMessageStateDelivered || state == LinphoneChatMessageStateNotDelivered) {
|
||||
if (state == LinphoneChatMessageStateDisplayed || state == LinphoneChatMessageStateNotDelivered) {
|
||||
env->DeleteGlobalRef(listener);
|
||||
msg->message_state_changed_user_data = NULL;
|
||||
}
|
||||
|
|
@ -4723,7 +4723,7 @@ static void chat_room_impl_callback(LinphoneChatMessage* msg, LinphoneChatMessag
|
|||
jmessage,
|
||||
env->CallStaticObjectMethod(ljb->chatMessageStateClass,ljb->chatMessageStateFromIntId,(jint)state));
|
||||
|
||||
if (state == LinphoneChatMessageStateDelivered || state == LinphoneChatMessageStateNotDelivered) {
|
||||
if (state == LinphoneChatMessageStateDisplayed || state == LinphoneChatMessageStateNotDelivered) {
|
||||
env->DeleteGlobalRef(listener);
|
||||
env->DeleteGlobalRef(jmessage);
|
||||
linphone_chat_message_set_user_data(msg,NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue