From 4938878d10041c4105793dfd484a0b83a7d8bd98 Mon Sep 17 00:00:00 2001 From: Alistair McKinlay Date: Mon, 17 Apr 2017 10:35:27 +0100 Subject: [PATCH] Disable show more button when loading messages --- client/js/lounge.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/js/lounge.js b/client/js/lounge.js index e10c9d73..7fcf5d25 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -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