mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
This commit extracts the method compose_actions.on_narrow() to handle changing the compose box (as appropriate) after any narrowing action. This change should be mostly non-user-facing, but it's not exactly a trivial extraction. For the case where the user already had content in their compose box, we continue to leave the compose box alone, but we now update compose fading 150+ lines later in narrow.activate(). Likewise, for cases where we cancel composing, this will also happen later in the function. Finally, for PM narrows, where we auto-open the compose box, we no longer call compose.cancel() before calling compose.start(), because either a) the compose box would have not been open in the first place or b) the start() function can handle clearing the old fields.
9.2 KiB
9.2 KiB