mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
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:
@@ -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) {
|
export function show_message_expander(row) {
|
||||||
if (row.find(".could-be-condensed").length !== 0) {
|
if (row.find(".could-be-condensed").length !== 0) {
|
||||||
row.find(".message_expander").show();
|
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) {
|
export function condense_and_collapse(elems) {
|
||||||
const height_cutoff = message_viewport.height() * 0.65;
|
const height_cutoff = message_viewport.height() * 0.65;
|
||||||
|
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ function timer_text(seconds_left) {
|
|||||||
function edit_message(row, raw_content) {
|
function edit_message(row, raw_content) {
|
||||||
row.find(".message_reactions").hide();
|
row.find(".message_reactions").hide();
|
||||||
condense.hide_message_expander(row);
|
condense.hide_message_expander(row);
|
||||||
|
condense.hide_message_condenser(row);
|
||||||
const content_top = row.find(".message_top_line")[0].getBoundingClientRect().top;
|
const content_top = row.find(".message_top_line")[0].getBoundingClientRect().top;
|
||||||
|
|
||||||
const message = current_msg_list.get(rows.id(row));
|
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);
|
compose.abort_video_callbacks(message.id);
|
||||||
}
|
}
|
||||||
|
if (row.find(".condensed").length !== 0) {
|
||||||
condense.show_message_expander(row);
|
condense.show_message_expander(row);
|
||||||
|
} else {
|
||||||
|
condense.show_message_condenser(row);
|
||||||
|
}
|
||||||
row.find(".message_reactions").show();
|
row.find(".message_reactions").show();
|
||||||
|
|
||||||
// We have to blur out text fields, or else hotkeys.js
|
// We have to blur out text fields, or else hotkeys.js
|
||||||
|
|||||||
Reference in New Issue
Block a user