message_list_view: Remove check for mention class.

This check caused us to only run the code inside that block if the
message mentioned the current user (since that's when the `mention`
class is added to the main message row).

While this was a useful performance optimization, it probably was a
small one, not worth it for the correctness cost.
This commit is contained in:
varunvaruns9
2018-12-18 19:02:58 +05:30
committed by Tim Abbott
parent 6d51c065d3
commit eca1ce7f1f

View File

@@ -452,7 +452,6 @@ MessageListView.prototype = {
content.addClass('rtl'); content.addClass('rtl');
} }
if (row.hasClass('mention')) {
row.find('.user-mention').each(function () { row.find('.user-mention').each(function () {
var user_id = get_user_id_for_mention_button(this); var user_id = get_user_id_for_mention_button(this);
// We give special highlights to the mention buttons // We give special highlights to the mention buttons
@@ -471,7 +470,6 @@ MessageListView.prototype = {
$(this).text("@" + people.get_person_from_user_id(user_id).full_name); $(this).text("@" + people.get_person_from_user_id(user_id).full_name);
} }
}); });
}
// Display emoji (including realm emoji) as text if // Display emoji (including realm emoji) as text if
// page_params.emojiset is 'text'. // page_params.emojiset is 'text'.