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. 4
      twister_following.js

4
mobile_abstract.js

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

2
twister_actions.js

@ -175,7 +175,7 @@ function updateProfileData(profileModalContent, username) {
getFollowers( username, profileModalContent.find(".followers-count") ); getFollowers( username, profileModalContent.find(".followers-count") );
getNumFollowing( username, profileModalContent.find(".following-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); requestPostRecursively(profileModalContent.find(".postboard-posts"),username,"status",10);
} }

4
twister_following.js

@ -96,7 +96,9 @@ function loadFollowingIntoList( username, html_list ) {
following_user_li.find(".following-screen-name b").text(following_user); following_user_li.find(".following-screen-name b").text(following_user);
getAvatar( following_user, following_user_li.find(".mini-profile-photo") ); 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 ); html_list.append( following_user_li );
}); });

Loading…
Cancel
Save