Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

popover-actions-data: Refactor stream message boolean variable name.

Lauryn Menard245d2f7e91cc
diff --git a/web/src/popover_menus_data.ts b/web/src/popover_menus_data.ts
index 5d1b5020661..9930bd2846a 100644
--- a/web/src/popover_menus_data.ts
+++ b/web/src/popover_menus_data.ts
@@ -185,14 +185,13 @@ export function get_actions_popover_content_context(message_id: number): ActionP
// To work around #22893, we also only offer the option if the
// fetch_status data structure means we'll be able to mark
// everything below the current message as read correctly.
- const not_stream_message = message.type !== "stream";
- const subscribed_to_stream =
- message.type === "stream" && stream_data.is_subscribed(message.stream_id);
+ const stream_message = message.type === "stream";
+ const subscribed_to_stream = stream_message && stream_data.is_subscribed(message.stream_id);
const should_display_mark_as_unread =
- !message.unread && not_spectator && (not_stream_message || subscribed_to_stream);
+ !message.unread && not_spectator && (!stream_message || subscribed_to_stream);
let stream_id;
- if (!not_stream_message) {
+ if (stream_message) {
stream_id = message.stream_id;
}