Closed zhouchunxu closed 8 years ago
I tried to reproduce the problem but I couldn't. I marked multiple messages as read but the display notification is always sent only once for each. This is normal since the DelayedDisplayNotificationDispatcher is serialized. Can you please describe the issue more accurately with the following information ?
Please provide also logcat and wireshark traces.
• initial conditions: A and B are online, A send 5 messages to B • actions: B open the conversation • expected result: B send a display report to A for each message • result: B send many duplicated display reports to A
Issue fixed by commit 7f5d7ed7676e09804e63805db4de97bf1d1f0d86
When there are some unread messages in a thread, if markMessageAsRead method has been called many times at the same time, it will cause the ImdnManager's fifo buffer to be filled with many same display delivery objects and then sent to network. Because it is asynchronous between the action of queuing some display report in local and the action of updating message's status from "DISPLAY_REPORT_REQUESTED“ to "RECEIVED". Maybe every delivery report should be send immediately when DelayedDisplayNotificationDispatcher be called to avoid the duplicated queued delivery objects.