mirror of https://github.com/zulip/zulip.git
UI: Fix redundant condense message appearing in edit message menu.
Added the handler functions which were previously missing for when a user tries to edit/view source of a message after expanding it. Fixes #17478
This commit is contained in:
parent
3dcf97bf27
commit
ec88ba38a9
|
@ -170,12 +170,24 @@ export function hide_message_expander(row) {
|
|||
}
|
||||
}
|
||||
|
||||
export function hide_message_condenser(row) {
|
||||
if (row.find(".could-be-condensed").length !== 0) {
|
||||
row.find(".message_condenser").hide();
|
||||
}
|
||||
}
|
||||
|
||||
export function show_message_expander(row) {
|
||||
if (row.find(".could-be-condensed").length !== 0) {
|
||||
row.find(".message_expander").show();
|
||||
}
|
||||
}
|
||||
|
||||
export function show_message_condenser(row) {
|
||||
if (row.find(".could-be-condensed").length !== 0) {
|
||||
row.find(".message_condenser").show();
|
||||
}
|
||||
}
|
||||
|
||||
export function condense_and_collapse(elems) {
|
||||
const height_cutoff = message_viewport.height() * 0.65;
|
||||
|
||||
|
|
|
@ -293,6 +293,7 @@ function timer_text(seconds_left) {
|
|||
function edit_message(row, raw_content) {
|
||||
row.find(".message_reactions").hide();
|
||||
condense.hide_message_expander(row);
|
||||
condense.hide_message_condenser(row);
|
||||
const content_top = row.find(".message_top_line")[0].getBoundingClientRect().top;
|
||||
|
||||
const message = current_msg_list.get(rows.id(row));
|
||||
|
@ -593,7 +594,11 @@ export function end_message_row_edit(row) {
|
|||
|
||||
compose.abort_video_callbacks(message.id);
|
||||
}
|
||||
if (row.find(".condensed").length !== 0) {
|
||||
condense.show_message_expander(row);
|
||||
} else {
|
||||
condense.show_message_condenser(row);
|
||||
}
|
||||
row.find(".message_reactions").show();
|
||||
|
||||
// We have to blur out text fields, or else hotkeys.js
|
||||
|
|
Loading…
Reference in New Issue