mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Hide the 'load more' button sooner if there are no more messages to load
(imported from commit ac046851c3a74a6f053e5f3c3b2950526a49cc46)
This commit is contained in:
@@ -632,9 +632,10 @@ function restart_get_updates() {
|
||||
}
|
||||
|
||||
function load_more_messages() {
|
||||
load_old_messages(message_array[0].id - 1, "older", 400,
|
||||
var batch_size = 400;
|
||||
load_old_messages(message_array[0].id - 1, "older", batch_size,
|
||||
function (messages) {
|
||||
if (messages.length === 0) {
|
||||
if (messages.length !== batch_size) {
|
||||
$('#load_more').hide();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user