Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose: Correct faulty logic for determining attention state.
Karl Stolley6d4cd1b9d0d5
diff --git a/web/src/compose_actions.ts b/web/src/compose_actions.tsindex 25c5c7e86b9..a7c099ce3bf 100644--- a/web/src/compose_actions.ts+++ b/web/src/compose_actions.ts@@ -218,12 +218,15 @@ export let complete_starting_tasks = (opts: ComposeActionsOpts): void => {compose_recipient.update_compose_area_placeholder_text();compose_recipient.update_narrow_to_recipient_visibility();compose_recipient.update_recipient_row_attention_level();+// This logic catches the corner case of starting a new topic// from within an existing *general chat* topic via buttons// in the left sidebar and collapsed compose box as well as// the compose hotkey, ensuring that we have a high-attention// recipient row.- const is_new_topic_triggered = opts.trigger === "clear topic button" || "compose_hotkey";+ const new_topic_triggers = ["clear topic button", "compose_hotkey"];+ const is_new_topic_triggered = new_topic_triggers.includes(opts.trigger);+if (is_new_topic_triggered) {compose_recipient.set_high_attention_recipient_row();}