refactor: Remove hardcoded frb height.

This commit is contained in:
Ryan Rehman 2021-03-05 23:11:42 +05:30 committed by Tim Abbott
parent 589a7799dc
commit aa00ef3a32
1 changed files with 3 additions and 10 deletions

View File

@ -20,8 +20,9 @@ export function first_visible_message(bar) {
// overlaps the floating recipient bar's space (since you ).
const messages = bar.children(".message_row");
const frb_bottom = get_frb_bottom();
const frb_top = frb_bottom - 25;
const frb = $("#floating_recipient_bar");
const frb_top = top_offset(frb);
const frb_bottom = frb_top + frb.safeOuterHeight();
let result;
for (const message_element of messages) {
@ -109,14 +110,6 @@ export function get_date(elem) {
return rendered_date;
}
export function get_frb_bottom() {
const bar = $("#floating_recipient_bar");
const bar_top = top_offset(bar);
const bar_bottom = bar_top + bar.safeOuterHeight();
return bar_bottom;
}
export function relevant_recipient_bars() {
let elems = [];