Merge pull request #1045 from thelounge/495-disable-more-messages

Disable show more button when loading messages
This commit is contained in:
Jérémie Astori 2017-04-19 10:12:14 -04:00 committed by GitHub
commit 5a274f3316

View file

@ -505,6 +505,8 @@ $(function() {
lastDate = msgDate;
});
scrollable.find(".show-more").prop("disabled", false);
});
socket.on("network", function(data) {
@ -1224,6 +1226,7 @@ $(function() {
chat.on("click", ".show-more-button", function() {
var self = $(this);
var count = self.parent().next(".messages").children(".msg").length;
self.prop("disabled", true);
socket.emit("more", {
target: self.data("id"),
count: count