Hi
I download statusnet-client and try to run it in android emulator. And can't show timeline.
Trace the code, I found in status_timelineview.js have follow code:
StatusNet.TimelineView.prototype.appendTimelineNotice = function(notice) {
StatusNet.AvatarCache.lookupAvatar(notice.avatar,
function(filename) {
notice.avatar = filename;
Titanium.App.fireEvent('StatusNet_appendTimelineNotice', {notice: notice});
},
function(url) {
Titanium.App.fireEvent('StatusNet_appendTimelineNotice', {notice: notice});
}
);
};
I found the notice is an object by log.
But in timeline.html
function objectOrJson(obj) {
if (typeof obj == "string") {
// On Android, objects get passed to us as JSON. Srsly?
return eval('(' + obj + ')');
} else {
return obj;
}
}
I found it's a string in android but it's a object in iphone!!!!!!!!
And the obj is {apiroot=
http://statusnet-server/api/, username=user1}
So the program crash in eval('(' + obj + ')');
I guess it's a bug of Titanium.App.fireEvent.
But Anybody can tell me how to fix this issue?
Comments
Problem was that the client crashed most of the time or it simply stopped working.
If you want to have a reliable statusnet client then take seesmic or mustard.