message_edit: Fix red highlighting for messages mentioning you.

When we added support for mentioning users when editing messages, we
neglected to add this bit of code needed to make sure the UI code in
message_list_view.js would actually rerender that part of the
message's state.

Arguably, this is a sign that the message_container structure should
be just recomputed every time we rerender messages, but that's a less
tactical fix.
This commit is contained in:
Tim Abbott
2017-10-20 16:36:08 -07:00
parent 0600646fbf
commit 4db99196e9
2 changed files with 4 additions and 0 deletions

View File

@@ -125,6 +125,7 @@ exports.update_messages = function update_messages(events) {
}
msgs_to_rerender.push(msg);
msg.flags = event.flags;
message_store.set_message_booleans(msg, event.flags);
condense.un_cache_message_content_height(msg.id);

View File

@@ -866,6 +866,9 @@ MessageListView.prototype = {
this._add_msg_timestring(message_container);
this._maybe_format_me_message(message_container);
// Make sure the right thing happens if the message was edited to mention us.
message_container.contains_mention = message_container.msg.mentioned;
var rendered_msg = $(this._get_message_template(message_container));
if (message_content_edited) {
rendered_msg.addClass("fade-in-message");