Merge pull request #1045 from thelounge/495-disable-more-messages
Disable show more button when loading messages
This commit is contained in:
commit
5a274f3316
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user