mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
compose: Show resolve topic banner only once per narrow.
Previously, when sending a message to a resolved topic, if you disissed the 'You are sending a message to a resolved topic' banner, it would reappear as soon as the user enters another character. Fix this by showing the banner at most once per narrow. It does not reappear if the user closes the banner and continues typing. It will only be shown again if the user closes compose, changes stream/topic, sends a message or otherwise clears the compose box state. We also remove the existing check for whether this banner is already visible; this is essentially a more precise version of the same logic. Fixes #24245.
This commit is contained in:
committed by
Tim Abbott
parent
0e55b2aed9
commit
c58f38dae3
@@ -96,6 +96,11 @@ function update_fade() {
|
||||
}
|
||||
|
||||
const msg_type = compose_state.get_message_type();
|
||||
|
||||
// It's possible that the new topic is not a resolved topic
|
||||
// so we clear the older warning.
|
||||
compose_validate.clear_topic_resolved_warning();
|
||||
|
||||
compose_validate.warn_if_topic_resolved();
|
||||
compose_fade.set_focused_recipient(msg_type);
|
||||
compose_fade.update_all();
|
||||
|
||||
Reference in New Issue
Block a user