fixed but with wrong names to mentions

This commit is contained in:
Jeena Paradies 2012-11-03 12:54:48 +01:00
parent b6cfa024d9
commit d938b83a85

View file

@ -29,7 +29,6 @@ function Core(action) {
Core.prototype.newStatus = function(status) { Core.prototype.newStatus = function(status) {
if(status != null && status.length > 0) { if(status != null && status.length > 0) {
this.since_id = status[0]["id"];
for(var i = status.length-1, c=0; i>=c; --i) { for(var i = status.length-1, c=0; i>=c; --i) {
if(this.body.childNodes.length > 0) { if(this.body.childNodes.length > 0) {
if(this.body.childNodes.length > this.max_length) { if(this.body.childNodes.length > this.max_length) {
@ -116,7 +115,7 @@ Core.prototype.getItem = function(status) {
template.source.href = status.app.url; template.source.href = status.app.url;
template.source.innerHTML = status.app.name; template.source.innerHTML = status.app.name;
template.source.title = status.app.url; template.source.title = status.id;
return template.item; return template.item;
} }
@ -225,6 +224,7 @@ Core.prototype.getTemplate = function() {
} }
Core.prototype.getNewData = function() { Core.prototype.getNewData = function() {
if (this.action == "mentions") return;
var those = this; var those = this;
var url = URI(mkApiRootPath("/posts")); var url = URI(mkApiRootPath("/posts"));
@ -393,6 +393,7 @@ function findMentions(node, mentions) {
for (var i = 0; i < mentions_in_text.length; i++) { for (var i = 0; i < mentions_in_text.length; i++) {
var mention = mentions_in_text[i]; var mention = mentions_in_text[i];
(function(mention) { // need this closure
findProfileURL(mention.entity, function(profile_url) { findProfileURL(mention.entity, function(profile_url) {
if (profile_url) { if (profile_url) {
getURL(profile_url, "GET", function(resp) { getURL(profile_url, "GET", function(resp) {
@ -413,6 +414,7 @@ function findMentions(node, mentions) {
}, null, false); // do not send auth-headers }, null, false); // do not send auth-headers
} }
}); });
})(mention);
} }
} }