Browse Source

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

starts with screenname as default, as dhtget suceeds it will be replaced with fullname.
master
Miguel Freitas 11 years ago
parent
commit
2d3f8c3935
  1. 4
      mobile_abstract.js
  2. 2
      twister_actions.js
  3. 6
      twister_following.js

4
mobile_abstract.js

@ -148,7 +148,7 @@ var MAL = function() @@ -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() @@ -180,7 +180,7 @@ var MAL = function()
}
}
this.isFollowingUrl = function(username) {
this.followingUrl = function(username) {
if( $.hasOwnProperty("mobile") ) {
return "#following?user=" + username;
} else {

2
twister_actions.js

@ -175,7 +175,7 @@ function updateProfileData(profileModalContent, username) { @@ -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);
}

6
twister_following.js

@ -96,8 +96,10 @@ function loadFollowingIntoList( username, html_list ) { @@ -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);

Loading…
Cancel
Save