Disable show more button when loading messages

This commit is contained in:
Alistair McKinlay 2017-04-17 10:35:27 +01:00
parent fb04f9fcbf
commit 4938878d10

View File

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