mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
compose: Fix loss of message fading on renarrow.
Previously, if you renarrowed, all message fading would be cleared until you close and then reopen the compose box. Fixes #1024. (imported from commit 57981ba29ab597c4c84ca6e4e9d04a8284f49117)
This commit is contained in:
@@ -100,14 +100,16 @@ function fade_around(reply_message) {
|
||||
ui.disable_floating_recipient_bar();
|
||||
}
|
||||
|
||||
exports.unfade_messages = function () {
|
||||
exports.unfade_messages = function (clear_state) {
|
||||
if (faded_to === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
var fade_class = narrow.active() ? "message_reply_fade_narrowed" : "message_reply_fade";
|
||||
rows.get_table(current_msg_list.table_name).find(".recipient_row, .messagebox").removeClass(fade_class);
|
||||
faded_to = undefined;
|
||||
if (clear_state === true) {
|
||||
faded_to = undefined;
|
||||
}
|
||||
ui.enable_floating_recipient_bar();
|
||||
};
|
||||
|
||||
@@ -165,7 +167,7 @@ exports.start = function (msg_type, opts) {
|
||||
if (opts.replying_to_message !== undefined) {
|
||||
if (exports.composing() && (faded_to !== opts.replying_to_message)) {
|
||||
// Already faded to another message. First unfade everything.
|
||||
exports.unfade_messages();
|
||||
exports.unfade_messages(true);
|
||||
}
|
||||
fade_around(opts.replying_to_message);
|
||||
}
|
||||
@@ -274,7 +276,7 @@ exports.hide = function () {
|
||||
$('.message_comp').slideUp(100,
|
||||
function() { $('#compose').css({visibility: "hidden"});});
|
||||
notifications_bar.enable();
|
||||
exports.unfade_messages();
|
||||
exports.unfade_messages(true);
|
||||
};
|
||||
|
||||
exports.clear = function () {
|
||||
|
||||
Reference in New Issue
Block a user