mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +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:
@@ -88,7 +88,7 @@ exports.unfade_messages = function (clear_state) {
|
|||||||
if (clear_state === true) {
|
if (clear_state === true) {
|
||||||
focused_recipient = undefined;
|
focused_recipient = undefined;
|
||||||
}
|
}
|
||||||
ui.enable_floating_recipient_bar();
|
ui.update_floating_recipient_bar();
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.update_faded_messages = function () {
|
exports.update_faded_messages = function () {
|
||||||
@@ -114,7 +114,7 @@ exports.update_faded_messages = function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.disable_floating_recipient_bar();
|
ui.update_floating_recipient_bar();
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.update_recipient_on_narrow = function () {
|
exports.update_recipient_on_narrow = function () {
|
||||||
|
|||||||
@@ -354,7 +354,6 @@ function show_floating_recipient_bar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var old_label;
|
var old_label;
|
||||||
var disable_floating_recipient_bar = false;
|
|
||||||
function replace_floating_recipient_bar(desired_label) {
|
function replace_floating_recipient_bar(desired_label) {
|
||||||
var new_label, other_label, header;
|
var new_label, other_label, header;
|
||||||
if (desired_label !== old_label) {
|
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 () {
|
exports.update_floating_recipient_bar = function () {
|
||||||
if (disable_floating_recipient_bar) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var floating_recipient_bar = $("#floating_recipient_bar");
|
var floating_recipient_bar = $("#floating_recipient_bar");
|
||||||
var floating_recipient_bar_top = floating_recipient_bar.offset().top;
|
var floating_recipient_bar_top = floating_recipient_bar.offset().top;
|
||||||
var floating_recipient_bar_bottom = floating_recipient_bar_top + floating_recipient_bar.outerHeight();
|
var floating_recipient_bar_bottom = floating_recipient_bar_top + floating_recipient_bar.outerHeight();
|
||||||
@@ -441,6 +427,12 @@ exports.update_floating_recipient_bar = function () {
|
|||||||
return;
|
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
|
// 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
|
// above it). This means we're not showing any useful part of the
|
||||||
// message above us, so why bother showing the label?
|
// message above us, so why bother showing the label?
|
||||||
|
|||||||
Reference in New Issue
Block a user