fixed #20
This commit is contained in:
parent
46d59dbce3
commit
d8683ed9d5
2 changed files with 24 additions and 6 deletions
|
@ -12,6 +12,7 @@ function(Core, Paths, HostApp, URI) {
|
||||||
Core.call(this);
|
Core.call(this);
|
||||||
|
|
||||||
this.action = "timeline";
|
this.action = "timeline";
|
||||||
|
this.reload_blocked = false;
|
||||||
|
|
||||||
this.max_length = 200;
|
this.max_length = 200;
|
||||||
this.timeout = 10 * 1000; // every 10 seconds
|
this.timeout = 10 * 1000; // every 10 seconds
|
||||||
|
@ -82,12 +83,16 @@ function(Core, Paths, HostApp, URI) {
|
||||||
}
|
}
|
||||||
|
|
||||||
those.newStatus(json);
|
those.newStatus(json);
|
||||||
|
those.reload_blocked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = null;
|
var data = null;
|
||||||
|
|
||||||
if (HostApp.stringForKey("user_access_token")) {
|
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);
|
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;
|
return Timeline;
|
||||||
|
|
||||||
});
|
});
|
|
@ -73,4 +73,21 @@ function debug(string) {
|
||||||
alert("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();
|
||||||
|
|
||||||
|
|
Reference in a new issue