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

This commit is contained in:
Simon Grim 2015-03-10 23:36:09 +05:00
parent 33bea37ae0
commit 64e85c3601
4 changed files with 24 additions and 19 deletions

View File

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

View File

@ -148,7 +148,8 @@ var InterfaceFunctions = function()
.on("eventUnfollow", function(e, user) {
$(".following-count").text(followingUsers.length-1);
$('.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();
});
});

View File

@ -93,9 +93,9 @@ TwisterFollowing.prototype = {
delete this.followingsFollowings[username];
this.save();
}
if (username in _idTrackerMap)
if (typeof _idTrackerMap !== 'undefined' && username in _idTrackerMap)
delete _idTrackerMap[username];
if (username in _lastHaveMap)
if (typeof _lastHaveMap !== 'undefined' && username in _lastHaveMap)
delete _lastHaveMap[username];
return;
}
@ -111,10 +111,12 @@ TwisterFollowing.prototype = {
if (updated)
this.save();
if (typeof _idTrackerMap !== 'undefined')
for (var user in _idTrackerMap) {
if (followingUsers.indexOf(user) < 0)
delete _idTrackerMap[user];
}
if (typeof _lastHaveMap !== 'undefined')
for (var user in _lastHaveMap) {
if (followingUsers.indexOf(user) < 0)
delete _lastHaveMap[user];

View File

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