tippy: Fix compose close button logic.

There are two different tooltips for compose close button
in compose box. One is when there is no text in the inputbox
that says 'Cancel compose' and if there is text in the inputbox
then it says 'Cancel compose and save draft' however the logic
of these two tooltips was reversed. This commit fixes that.
This commit is contained in:
Palash Baderia
2022-10-11 17:50:27 +05:30
committed by Tim Abbott
parent ebc07c0dd7
commit 9809d229de

View File

@@ -460,12 +460,12 @@ export function initialize() {
// Change compose close button tooltip as per condition.
// We save compose text in draft only if its length is > 2.
if (compose_text_length > 2) {
$("#compose_close").attr("data-tooltip-template-id", "compose_close_tooltip_template");
} else {
$("#compose_close").attr(
"data-tooltip-template-id",
"compose_close_and_save_tooltip_template",
);
} else {
$("#compose_close").attr("data-tooltip-template-id", "compose_close_tooltip_template");
}
});