Quellcode durchsuchen

Fix behavior to hide articles

I do not like it since it is partly duplicated. We need to find something better.
Alexis Degrugillier vor 11 Jahren
Ursprung
Commit
53410887c9
1 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen
  1. 7 2
      p/scripts/main.js

+ 7 - 2
p/scripts/main.js

@@ -689,10 +689,15 @@ function init_stream(divStream) {
 
 	divStream.on('click', '.flux a.read', function () {
 		var active = $(this).parents(".flux");
-		mark_read(active, false);
-		if (context['auto_remove_article']) {
+		if (context['auto_remove_article'] && active.hasClass('not_read')) {
+			var p = active.prev();
+			var n = active.next();
+			if (p.hasClass('day') && n.hasClass('day')) {
+				p.remove();
+			}
 			active.remove();
 		}
+		mark_read(active, false);
 		return false;
 	});