Commit d71c1328 authored by Florian Müllner's avatar Florian Müllner

chatView: Don't insert pending message multiple times

The 'notify::channel' handler assumes that the signal is only
emitted on actual property changes. However this assumption is
wrong, as the property is set via g_object_set_property() which
will always notify. So handle notifies without a value change
by filtering out pending messages that have already been inserted
previously.
parent f27f177f
......@@ -489,6 +489,9 @@ const ChatView = new Lang.Class({
this._room.channel.dup_pending_messages().forEach(Lang.bind(this,
function(message) {
let [id, ] = message.get_pending_message_id();
if (this._pending[id])
return;
this._insertTpMessage(this._room, message);
}));
this._checkMessages();
......
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