Skip to content

A free, self-hostable news aggregator…

Fix behavior to hide articles

Alexis Degrugillier53410887c941
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 19eba206d..e48630d89 100644
--- a/p/scripts/main.js
+++ b/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;
});