fixed problems with scroll to load more

This commit is contained in:
jeena 2013-04-14 13:36:53 +02:00
parent 624dd9a1b9
commit be8a0c63e3
10 changed files with 101 additions and 45 deletions

View file

@ -417,11 +417,10 @@ function(HostApp, Core, Paths, URI) {
if(statuses != null && statuses.length > 0) {
var last_status = statuses[statuses.length -1];
this.before.id = last_status.id
this.before.entity = last_status.entity;
this.before.loading = false;
if (append) statuses = statuses.reverse();
for(var i = statuses.length-1, c=0; i>=c; --i) {
var status = statuses[i];
@ -460,11 +459,11 @@ function(HostApp, Core, Paths, URI) {
}
Profile.prototype.getMoreStatusPosts = function() {
if (!this.before.loading && this.before.id) {
if (!this.before.loading) {
this.before.loading = true;
var add_search = {
"before_id": this.before.id,
"before_id_entity": this.before.entity
"before_id": this.body.lastChild.status.id,
"before_id_entity": this.body.lastChild.status.entity
}
this.getStatuses(this.server, add_search, true);
}