Commit f74e37be authored by Brieuc Viel's avatar Brieuc Viel
Browse files

[Imdm] remover listener cleaning on delivered

parent 2e6d2b82
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment