Assign last visible div to var.

This commit is contained in:
swordbeta 2017-05-17 13:19:18 +02:00
parent 979d992bd1
commit 24419cb8e8

View File

@ -442,11 +442,11 @@ $(function() {
target, target,
data data
]); ]);
var lastVisible = container.find("div:visible").last();
if (data.msg.self if (data.msg.self
|| container.find("div:visible").last().hasClass("unread-marker") || lastVisible.hasClass("unread-marker")
|| (container.find("div:visible").last().hasClass("date-marker") || (lastVisible.hasClass("date-marker")
&& container.find("div:visible").last().prev().hasClass("unread-marker"))) { && lastVisible.prev().hasClass("unread-marker"))) {
container container
.find(".unread-marker") .find(".unread-marker")
.appendTo(container); .appendTo(container);