this actually solves #46

This commit is contained in:
Hannes Mannerheim 2016-03-07 18:43:01 +01:00
parent e321f40a64
commit 351a1fc461

View File

@ -1927,8 +1927,7 @@ function addToFeed(feed, after, extraClasses) {
if($('#stream-item-' + obj.id).length == 0) { if($('#stream-item-' + obj.id).length == 0) {
// if the this or the repeated notice already exist in feed, we add this, but hidden // if the this or the repeated notice already exist in feed, we add this, but hidden
if($('.stream-item[data-quitter-id="' + obj.retweeted_status.id + '"]').length > 0 if($('.stream-item[data-quitter-id="' + obj.retweeted_status.id + '"]').length > 0) {
|| $('.stream-item[data-quitter-id="' + obj.id + '"]').length > 0) {
extraClassesThisRun += ' hidden-repeat'; extraClassesThisRun += ' hidden-repeat';
} }
@ -1950,6 +1949,14 @@ function addToFeed(feed, after, extraClasses) {
// only if not already exist // only if not already exist
if($('#stream-item-' + obj.id).length == 0) { if($('#stream-item-' + obj.id).length == 0) {
// sometimes the notice already exist but in the form of a repeat, because of
// a repeat reaching our server before the actual notice, or because of date settings
// on different servers, anyhow, hide this notice if a repeat of it already exist in
// the stream, using the hidden-repeat class (a little confusing maybe)
if($('.stream-item[data-quitter-id="' + obj.id + '"]').length > 0) {
extraClassesThisRun += ' hidden-repeat';
}
// remove any matching temp post // remove any matching temp post
if(typeof obj.user != 'undefined' if(typeof obj.user != 'undefined'
&& obj.user.id == window.loggedIn.id && obj.user.id == window.loggedIn.id