minor fixes to "following" display support by @msjoinder.

starts with screenname as default, as dhtget suceeds it will be replaced with fullname.
This commit is contained in:
Miguel Freitas 2014-01-06 15:55:26 -02:00
parent b8e67dc9b7
commit 2d3f8c3935
3 changed files with 7 additions and 5 deletions

View File

@ -148,7 +148,7 @@ var MAL = function()
}
this.followingUrlToUser = function(url) {
var dummyUrl = this.isFollowingUrl("");
var dummyUrl = this.followingUrl("");
var urlIdx = url.indexOf(dummyUrl);
if( urlIdx >= 0 )
return url.substr(urlIdx + dummyUrl.length);
@ -180,7 +180,7 @@ var MAL = function()
}
}
this.isFollowingUrl = function(username) {
this.followingUrl = function(username) {
if( $.hasOwnProperty("mobile") ) {
return "#following?user=" + username;
} else {

View File

@ -175,7 +175,7 @@ function updateProfileData(profileModalContent, username) {
getFollowers( username, profileModalContent.find(".followers-count") );
getNumFollowing( username, profileModalContent.find(".following-count") );
profileModalContent.find(".following-count").parent().attr("href", $.MAL.isFollowingUrl(username));
profileModalContent.find(".following-count").parent().attr("href", $.MAL.followingUrl(username));
requestPostRecursively(profileModalContent.find(".postboard-posts"),username,"status",10);
}

View File

@ -96,8 +96,10 @@ function loadFollowingIntoList( username, html_list ) {
following_user_li.find(".following-screen-name b").text(following_user);
getAvatar( following_user, following_user_li.find(".mini-profile-photo") );
getFullname( following_user, following_user_li.find(".mini-following-name") );
var $followingName = following_user_li.find(".mini-following-name");
$followingName.text(following_user);
getFullname( following_user, $followingName );
html_list.append( following_user_li );
});
}, null);