do not send DC_EVENT_MSGS_CHANGED or DC_EVENT_INCOMING_MSG for hidden messages

these events take the message-id as parameter and might be used
to update an existing list (although to recommended)

if the event is issued for hidden messages,
this might led to "empty" messages flashing up -
the ui tries to get the message from the event,
after a moment, on the next update, the message disappears again
as hidden messages are of course not returned eg. by dc_get_chat_msgs().

the effect was probably always visible for secure-join-messages on ios,
however, become much more visible recently when read-receipts are added
as hidden messages as well (to make them auto-deletable).
This commit is contained in:
B. Petersen
2020-04-30 16:56:43 +02:00
committed by link2xt
parent 4322b8b932
commit 54395a7252

View File

@@ -674,7 +674,7 @@ fn add_parts(
);
// check event to send
if chat_id.is_trash() {
if chat_id.is_trash() || *hidden {
*create_event_to_send = None;
} else if incoming && state == MessageState::InFresh {
if from_id_blocked {