Browse Source

deleting user self-retwisted posts when unfollow, fix of follow button placement in who-to-follow, workaround checks of in TwisterFollowing.update

master
Simon Grim 10 years ago
parent
commit
64e85c3601
  1. 9
      css/style.css
  2. 3
      js/interface_home.js
  3. 22
      js/twister_following.js
  4. 9
      theme_calm/css/style.css

9
css/style.css

@ -145,9 +145,9 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover
} }
.follow-suggestions .follow, .follow-suggestions .unfollow { .follow-suggestions .follow, .follow-suggestions .unfollow {
display: block; display: inline-block;
position: relative; float: right;
left: 50%; margin-right: 10px;
} }
/************************************* /*************************************
@ -702,7 +702,8 @@ textarea.splited-post {
.twister-user .twister-user
{ {
clear: both; clear: both;
padding-bottom: 10px; overflow: hidden;
padding-bottom: 4px;
margin-top: 4px; margin-top: 4px;
border-bottom: solid 1px rgba( 69, 71, 77, .1 ); border-bottom: solid 1px rgba( 69, 71, 77, .1 );
border-top: solid 1px rgba( 69, 71, 77, .1 ); border-top: solid 1px rgba( 69, 71, 77, .1 );

3
js/interface_home.js

@ -148,7 +148,8 @@ var InterfaceFunctions = function()
.on("eventUnfollow", function(e, user) { .on("eventUnfollow", function(e, user) {
$(".following-count").text(followingUsers.length-1); $(".following-count").text(followingUsers.length-1);
$('.wrapper .postboard .post').each( function() { $('.wrapper .postboard .post').each( function() {
if ($(this).find('[data-screen-name="'+user+'"]').length && !$(this).find(".post-retransmited-by").text()) if ($(this).find('[data-screen-name="'+user+'"]').length
&& (!$(this).find(".post-retransmited-by").text() || $(this).find(".post-retransmited-by").text() == '@'+user))
$( this ).remove(); $( this ).remove();
}); });
}); });

22
js/twister_following.js

@ -93,9 +93,9 @@ TwisterFollowing.prototype = {
delete this.followingsFollowings[username]; delete this.followingsFollowings[username];
this.save(); this.save();
} }
if (username in _idTrackerMap) if (typeof _idTrackerMap !== 'undefined' && username in _idTrackerMap)
delete _idTrackerMap[username]; delete _idTrackerMap[username];
if (username in _lastHaveMap) if (typeof _lastHaveMap !== 'undefined' && username in _lastHaveMap)
delete _lastHaveMap[username]; delete _lastHaveMap[username];
return; return;
} }
@ -111,14 +111,16 @@ TwisterFollowing.prototype = {
if (updated) if (updated)
this.save(); this.save();
for (var user in _idTrackerMap) { if (typeof _idTrackerMap !== 'undefined')
if (followingUsers.indexOf(user) < 0) for (var user in _idTrackerMap) {
delete _idTrackerMap[user]; if (followingUsers.indexOf(user) < 0)
} delete _idTrackerMap[user];
for (var user in _lastHaveMap) { }
if (followingUsers.indexOf(user) < 0) if (typeof _lastHaveMap !== 'undefined')
delete _lastHaveMap[user]; for (var user in _lastHaveMap) {
} if (followingUsers.indexOf(user) < 0)
delete _lastHaveMap[user];
}
for (; i < followingUsers.length; i++) { for (; i < followingUsers.length; i++) {
var ctime = new Date().getTime() / 1000; var ctime = new Date().getTime() / 1000;

9
theme_calm/css/style.css

@ -166,9 +166,9 @@ button.unfollow:hover {
} }
.follow-suggestions .follow, .follow-suggestions .unfollow { .follow-suggestions .follow, .follow-suggestions .unfollow {
display: block; display: inline-block;
position: relative; float: right;
left: 50%; margin-right: 10px;
} }
/************************************* /*************************************
@ -892,7 +892,8 @@ textarea.splited-post {
.twister-user .twister-user
{ {
clear: both; clear: both;
padding-bottom: 10px; overflow: hidden;
padding-bottom: 4px;
margin-top: 4px; margin-top: 4px;
border-bottom: solid 1px rgba( 69, 71, 77, .1 ); border-bottom: solid 1px rgba( 69, 71, 77, .1 );
border-top: solid 1px rgba( 69, 71, 77, .1 ); border-top: solid 1px rgba( 69, 71, 77, .1 );

Loading…
Cancel
Save