Use interval to clear inactive channel buffers
This commit is contained in:
parent
07a509a862
commit
a1f864b511
|
@ -735,9 +735,18 @@ $(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setInterval(function() {
|
||||||
|
chat.find(".chan:not(.active)").each(function() {
|
||||||
|
var chan = $(this);
|
||||||
|
if (chan.find(".messages").children().slice(0, -100).remove().length) {
|
||||||
|
chan.find(".show-more").addClass("show");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, 1000 * 10);
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
chat.find(".active .messages").empty();
|
chat.find(".active .messages").empty();
|
||||||
chat.find(".active .show-more").removeClass("hidden");
|
chat.find(".active .show-more").addClass("show");
|
||||||
}
|
}
|
||||||
|
|
||||||
function complete(word) {
|
function complete(word) {
|
||||||
|
|
Loading…
Reference in New Issue