mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 00:18:12 +00:00
Just use message.unread when rendering.
By the time we render messages, we will have set message.unread, so we don't need to calculate it from flags. We add a line to the local-echo path to make this explicit in that code.
This commit is contained in:
@@ -90,6 +90,7 @@ function insert_local_message(message_request, local_id) {
|
|||||||
// Locally delivered messages cannot be unread (since we sent them), nor
|
// Locally delivered messages cannot be unread (since we sent them), nor
|
||||||
// can they alert the user.
|
// can they alert the user.
|
||||||
message.flags = ['read']; // we may add more flags later
|
message.flags = ['read']; // we may add more flags later
|
||||||
|
message.unread = false;
|
||||||
|
|
||||||
message.raw_content = message.content;
|
message.raw_content = message.content;
|
||||||
|
|
||||||
|
|||||||
@@ -249,7 +249,6 @@ MessageListView.prototype = {
|
|||||||
|
|
||||||
message_container.contains_mention =
|
message_container.contains_mention =
|
||||||
notifications.speaking_at_me(message_container.msg);
|
notifications.speaking_at_me(message_container.msg);
|
||||||
message_container.msg.unread = unread.message_unread(message_container.msg);
|
|
||||||
self._maybe_format_me_message(message_container);
|
self._maybe_format_me_message(message_container);
|
||||||
|
|
||||||
prev = message_container;
|
prev = message_container;
|
||||||
|
|||||||
Reference in New Issue
Block a user