new post bug: increase offset

This commit is contained in:
Miroslav Šedivý 2020-01-22 21:42:26 +01:00
parent 37b523e689
commit 3fdbe8986a
2 changed files with 7 additions and 2 deletions

View file

@ -44,6 +44,6 @@ logs_path = data/logs/
[system]
system_name = blog
version = 1.22
version = 1.23
debug = false
logs = false

View file

@ -49,6 +49,11 @@ var posts = {
this.load();
},
add_new: function(post) {
$("#posts").prepend(post);
this.offset++;
},
load: function(){
// If is something loading now or is loading done
if(posts.loading || posts.last)
@ -343,7 +348,7 @@ var new_post = {
post.apply_post();
// Prepend
$("#posts").prepend(post);
posts.add_new(post);
}
});
});