Fix date-marker not being removed when at the top of the page sometimes
This commit is contained in:
parent
d695c64c04
commit
06ecf625c6
@ -420,9 +420,12 @@ $(function() {
|
|||||||
|
|
||||||
// Remove the date-change marker we put at the top, because it may
|
// Remove the date-change marker we put at the top, because it may
|
||||||
// not actually be a date change now
|
// not actually be a date change now
|
||||||
var firstChild = $(chan).children().eq(0);
|
var children = $(chan).children();
|
||||||
if (firstChild.attr("class") === "date-marker") {
|
if (children.eq(0).attr("class") === "date-marker") { // Check top most child
|
||||||
firstChild.remove();
|
children.eq(0).remove();
|
||||||
|
} else if (children.eq(0).attr("class") === "unread-marker" && children.eq(1).attr("class") === "date-marker") {
|
||||||
|
// Otherwise the date-marker would get 'stuck' because of the new-massages marker
|
||||||
|
children.eq(1).remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the scrollable wrapper around messages
|
// get the scrollable wrapper around messages
|
||||||
|
Loading…
Reference in New Issue
Block a user