mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 01:47:41 +00:00
Show the recipient bar when the compose box is open, as long as
it's on a message that isn't faded. Trac #1464 (imported from commit 7167ed0877d3885316b7d38af5f11ec5523d5f7d)
This commit is contained in:
@@ -354,7 +354,6 @@ function show_floating_recipient_bar() {
|
||||
}
|
||||
|
||||
var old_label;
|
||||
var disable_floating_recipient_bar = false;
|
||||
function replace_floating_recipient_bar(desired_label) {
|
||||
var new_label, other_label, header;
|
||||
if (desired_label !== old_label) {
|
||||
@@ -389,20 +388,7 @@ function hide_floating_recipient_bar() {
|
||||
}
|
||||
}
|
||||
|
||||
exports.disable_floating_recipient_bar = function () {
|
||||
disable_floating_recipient_bar = true;
|
||||
hide_floating_recipient_bar();
|
||||
};
|
||||
|
||||
exports.enable_floating_recipient_bar = function () {
|
||||
disable_floating_recipient_bar = false;
|
||||
};
|
||||
|
||||
exports.update_floating_recipient_bar = function () {
|
||||
if (disable_floating_recipient_bar) {
|
||||
return;
|
||||
}
|
||||
|
||||
var floating_recipient_bar = $("#floating_recipient_bar");
|
||||
var floating_recipient_bar_top = floating_recipient_bar.offset().top;
|
||||
var floating_recipient_bar_bottom = floating_recipient_bar_top + floating_recipient_bar.outerHeight();
|
||||
@@ -441,6 +427,12 @@ exports.update_floating_recipient_bar = function () {
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide if the message is faded
|
||||
if (current_label.hasClass('message_reply_fade')) {
|
||||
hide_floating_recipient_bar();
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide if our bottom is in our bookend (or one bookend-height
|
||||
// above it). This means we're not showing any useful part of the
|
||||
// message above us, so why bother showing the label?
|
||||
|
||||
Reference in New Issue
Block a user