mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-02-04 11:04:29 +00:00
add check for duplication of retwisters avatars on appending of them
This commit is contained in:
parent
f0d81c70ed
commit
250ed548d0
@ -135,8 +135,14 @@ function requestRTs(postDataElem) {
|
|||||||
req.find('.stat-count-value').text(ret.length);
|
req.find('.stat-count-value').text(ret.length);
|
||||||
|
|
||||||
var avatarRowElem = req.find('.avatar-row').empty();
|
var avatarRowElem = req.find('.avatar-row').empty();
|
||||||
for (var i = 0; i < ret.length && i < 12; i++)
|
var avatarsAppended = [];
|
||||||
|
for (var i = 0; i < ret.length && i < 12; i++) {
|
||||||
|
if (avatarsAppended.indexOf(ret[i].userpost.n) !== -1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
avatarsAppended.push(ret[i].userpost.n);
|
||||||
appendPeerAvatarToRTsRowElem(ret[i].userpost.n, avatarRowElem);
|
appendPeerAvatarToRTsRowElem(ret[i].userpost.n, avatarRowElem);
|
||||||
|
}
|
||||||
|
|
||||||
if (avatarRowElem.children().length)
|
if (avatarRowElem.children().length)
|
||||||
req.slideDown('fast');
|
req.slideDown('fast');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user