scheduled messages: Allow user to reschedule quickly from edit window.

Currently we unschedule messages as soon as they're opened for editing.
Users have requested a way to easily reschedule, especially for
situations where they didn't end up wanting to edit the messages in
the first place.

This commit adds an action button to reschedule the message for the
time it was originally scheduled for.

CZO:
https://chat.zulip.org/#narrow/stream/9-issues/topic/Scheduled.20message.20sent.20to.20draft.20if.20no.20changes
This commit is contained in:
evykassirer
2023-07-21 11:42:11 -07:00
committed by Tim Abbott
parent 3303b5ab72
commit 5b5ab1dbc1
2 changed files with 16 additions and 6 deletions

View File

@@ -566,6 +566,18 @@ export function initialize() {
},
);
$("body").on(
"click",
`.${CSS.escape(
compose_banner.CLASSNAMES.unscheduled_message,
)} .main-view-banner-action-button`,
(event) => {
event.preventDefault();
const send_at_timestamp = popover_menus.get_selected_send_later_timestamp();
popover_menus.do_schedule_message(send_at_timestamp);
},
);
$("body").on(
"click",
`.${CSS.escape(