client: fix chat not being stickied to the bottom when joining channel

This commit is contained in:
William Boman 2016-07-10 13:01:31 +02:00
parent 28938be10d
commit 41eede7003

View File

@ -788,11 +788,6 @@ $(function() {
.addClass("active") .addClass("active")
.trigger("show"); .trigger("show");
var chanChat = chan.find(".chat");
if (chanChat.length > 0) {
chanChat.sticky();
}
var title = "The Lounge"; var title = "The Lounge";
if (chan.data("title")) { if (chan.data("title")) {
title = chan.data("title") + " — " + title; title = chan.data("title") + " — " + title;
@ -804,6 +799,11 @@ $(function() {
setNick(self.closest(".network").data("nick")); setNick(self.closest(".network").data("nick"));
} }
var chanChat = chan.find(".chat");
if (chanChat.length > 0) {
chanChat.sticky();
}
if (chan.data("needsNamesRefresh") === true) { if (chan.data("needsNamesRefresh") === true) {
chan.data("needsNamesRefresh", false); chan.data("needsNamesRefresh", false);
socket.emit("names", {target: self.data("id")}); socket.emit("names", {target: self.data("id")});