This commit is contained in:
Jeena Paradies 2012-11-09 23:52:24 +01:00
parent 46d59dbce3
commit d8683ed9d5
2 changed files with 24 additions and 6 deletions

View file

@ -12,6 +12,7 @@ function(Core, Paths, HostApp, URI) {
Core.call(this);
this.action = "timeline";
this.reload_blocked = false;
this.max_length = 200;
this.timeout = 10 * 1000; // every 10 seconds
@ -82,12 +83,16 @@ function(Core, Paths, HostApp, URI) {
}
those.newStatus(json);
those.reload_blocked = false;
}
var data = null;
if (HostApp.stringForKey("user_access_token")) {
Paths.getURL(url.toString(), http_method, callback, data); // FIXME: error callback
if (!this.reload_blocked) {
this.reload_blocked = true;
Paths.getURL(url.toString(), http_method, callback, data); // FIXME: error callback
}
}
}
@ -97,10 +102,6 @@ function(Core, Paths, HostApp, URI) {
Core.prototype.sendNewMessage.call(this, content, in_reply_to_status_id, in_reply_to_entity, callback);
}
Timeline.prototype.foo = function(a) {
return a;
}
return Timeline;
});

View file

@ -73,4 +73,21 @@ function debug(string) {
alert("DEBUG: " + string);
}
setTimeout(HostAppGo, 2000);
function go() { // wait untill everything is loaded
setTimeout(function() {
if (HostAppGo != undefined) {
HostAppGo();
} else {
go();
}
}, 500);
}
go();